Skip to content

Commit

Permalink
Revert "fix: check existing_client support workspaceFolder (#3452)" (#…
Browse files Browse the repository at this point in the history
…3459)

This reverts commit fe88ead.
  • Loading branch information
glepnir authored Nov 26, 2024
1 parent fe88ead commit 064221e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lua/lspconfig/manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ end
--- @param root_dir string
--- @param client vim.lsp.Client
function M:_notify_workspace_folder_added(root_dir, client)
if
is_dir_in_workspace_folders(client, root_dir)
or not vim.tbl_get(client, 'server_capabilities', 'workspace', 'workspaceFolders', 'supported')
then
if is_dir_in_workspace_folders(client, root_dir) then
return
end

local supported = vim.tbl_get(client, 'server_capabilities', 'workspace', 'workspaceFolders', 'supported')
if not supported then
return
end

Expand Down Expand Up @@ -130,10 +132,6 @@ function M:_start_client(bufnr, new_config, root_dir, single_file, silent)
bufnr = bufnr,
silent = silent,
reuse_client = function(existing_client)
if not vim.tbl_get(existing_client, 'server_capabilities', 'workspace', 'workspaceFolders', 'supported') then
return false
end

if (self._clients[root_dir] or {})[existing_client.name] then
self:_notify_workspace_folder_added(root_dir, existing_client)
return true
Expand Down

0 comments on commit 064221e

Please sign in to comment.