Skip to content

Start only one rust-analyzer in different workspace root files #240

Answered by mrcjkb
xzbdmw asked this question in Q&A
Discussion options

You must be logged in to vote

I see. Again, this is the intended behaviour. See also this comment on a related lspconfig issue.

Please keep in mind that Neovim has no concept of a workspace. That is something that is implemented by plugins like project.nvim.
If nvim-tree (or some project management plugin you're using) is using the LSP client's config.root_dir as the source of truth to set the cwd or for the current buffer's project root, and is ignoring the workspace_folders, that's a bug.

It should be using the client's workspace_folders property, comparing the uris with the current buffer's path, and then fall back to the config.root_dir if it can't find a match in the workspace_folders.

If I have two files from di…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@xzbdmw
Comment options

@mrcjkb
Comment options

@xzbdmw
Comment options

@mrcjkb
Comment options

Answer selected by xzbdmw
@xzbdmw
Comment options

@mrcjkb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
wontfix This will not be worked on
2 participants
Converted from issue

This discussion was converted from issue #239 on February 18, 2024 21:23.