Skip to content

Is there a way to tell Metals to ignore a sub-project's build.sbt and instead treat all sub-projects as part of the main project? #584

Answered by JL102
JL102 asked this question in Q&A
Discussion options

You must be logged in to vote

Again if I'm understanding right, this is a bit of an unconventional setup in Scala and one thing that you could try is to hack the find_root_dir function yourself in your config since it is exposed. For example someone hit on this before as you can see in the example #257 (comment). Could you clean the workspace and try that with find_root_dir to see if it fixes this?

YES!!!! thank you so much!!! I managed to get it to work by modifying find_root_dir to check one level higher. This is now my config (in AstroNvim's user.lua, if anyone happens upon the same issue:

  {
    "scalameta/nvim-metals",
    dependencies = "nvim-lua/plenary.nvim",
    init = function()
      vim.api.nvim_create_…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@JL102
Comment options

Answer selected by JL102
@ckipp01
Comment options

@JL102
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants