scalameta / metals-feature-requests

Issue tracker for Metals feature requests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[VSCode] Support build files in non-workspace-root directories

jhostetler opened this issue · comments

Is your feature request related to a problem? Please describe.

I am using VSCode. I have a multi-language project structured like this:

project-root/
    python/
    jvm/
        pom.xml
        src/main/scala/...

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.

Additional context

Related issues:

scalameta/metals#5907
scalameta/metals#5188
scalameta/metals#5033

Search terms

working directory maven