Describe the bug
Source code navigation not working when multiple projects workspace is used under VSCode
To Reproduce
Create a VSCode workspace with multiple Project A and B
Init a Scala Project in A with SBT
Init a Scala Project in B with SBT
Let A project be the first in the list
Let B project be the second in the list
Expected behavior
When navigating A project, source code navigation must be working
When navigating B project, source code navigation must also be working
Screenshots
.metals and .bloop is created under the project A only
Installation:
Additional context
Search terms
VScode multi projects workspace
The Only way I get this one to work, is by swap the A <-> B project order in the workspace configuration.
By rerun the metal build, the project B is correctly indexed and navigable, but the the project A SC navigation breaks with the message :
WARN code navigation does not work for the file '..../A/src/main/scala/....scala' because it doesn't belong to a build target.
is there a way to index both Projects A and B and potentially many other projects in the same workspace.
It is hard to work on many modules (projject) without using the workspace feature of VSCode
Thank you for reporting! Multi-root workspaces are currently not supported, this functionality is blocked by two feature requests which are reported in
A possible workaround is maybe to keep two separate VS Code windows for each project instead of registering a new workspace directory.
Closing as a duplicate.
I've hit this :( Virtually every project i work on is a multi-module project.
Most helpful comment
I've hit this :( Virtually every project i work on is a multi-module project.