Metals always tries to launch in project-root/ and can't find the build file.
Describe the solution you'd like
Ideally, there would be a configuration option to tell Metals which directory to consider the root. So I could just set "metals.workDir" = "jvm/" or something. Perhaps it could even accept a list of directories.
Describe alternatives you've considered
It is possible to work around this limitation by opening a new VSCode window pointed at the jvm/ subdirectory. This is not ideal because one has to remember to switch to the new window when editing Scala code.
I tried adding the jvm/ subdirectory using File > Add Folder to Workspace ..., so that both project-root/ and project-root/jvm/ are top-level workspace folders, but Metals still wants to look in project-root/ only.
Is your feature request related to a problem? Please describe.
I am using VSCode. I have a multi-language project structured like this:
Metals always tries to launch in
project-root/
and can't find the build file.Describe the solution you'd like
Ideally, there would be a configuration option to tell Metals which directory to consider the root. So I could just set
"metals.workDir" = "jvm/"
or something. Perhaps it could even accept a list of directories.Describe alternatives you've considered
It is possible to work around this limitation by opening a new VSCode window pointed at the
jvm/
subdirectory. This is not ideal because one has to remember to switch to the new window when editing Scala code.I tried adding the
jvm/
subdirectory usingFile > Add Folder to Workspace ...
, so that bothproject-root/
andproject-root/jvm/
are top-level workspace folders, but Metals still wants to look inproject-root/
only.Additional context
Related issues:
https://github.com/scalameta/metals/issues/5907 https://github.com/scalameta/metals/issues/5188 https://github.com/scalameta/metals/pull/5033
Search terms
working directory maven