Skip to content
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

Only re-use the same server for multiple workspaces if the server supports it #2324

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lua/lspconfig/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,13 @@ function M.server_per_root_dir_manager(make_config)
return
end
local client = lsp.get_client_by_id(id)
if client and client.name == conf.name then
if
client
and client.name == conf.name
and client.server_capabilities
and client.server_capabilities.workspaceFolders
and client.server_capabilities.workspaceFolders.supported
then
return client
end
return nil
Expand Down