-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MS Language Server] Go to definition control only appears on primary workspace #5945
Comments
The issue is not a bug. LS only supports single root, it is not capable of handling multiple roots, especially with different versions of Python. Extension (and Visual Studio) runs multiple LS processes, one for each root (or project in solution in VS). Said instances are not able to communicate or navigate across tree spanning multiple processes. Making LS actually load multiple roots would a major architectural redesign. Thus the issue is that not that someone made a mistake (i.e. a bug) but rather conscious architectural design limitation. |
Closing in favour of #5132. |
Sometimes the
Go to definition
function will not appear in your VSCode if you have multiple workspaces and use the MS Language Server. You will only see the "Go to definition" function available if you are within the workspace that was active when you originally opened VSCode. Other workspaces will not have the Go to Definition function available.Let me give an example to be clear:
go_to_definition_primary_workspace
upper_level_project
workspaceupper_level_class.py
and reload VScode.level_2_class.py
.Level1Class
and you will notice that there is no "Go to definition" button available to you.level_2_project
workspace.level_2_class.py
and reload VSCodeupper_level_class.py
Level2Class
and you will notice that there is no "Go to definition" button available to you.Below is a gif of the described behavior.

Environment data
The text was updated successfully, but these errors were encountered: