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

after refactor server attach another project which does not support workspaceFolder #3461

Open
glepnir opened this issue Nov 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@glepnir
Copy link
Member

glepnir commented Nov 26, 2024

Description

tsserver does not support workspaceFolders, even the server does not support workspaceFolder it still return true.

reuse_client = function(existing_client)
if (self._clients[root_dir] or {})[existing_client.name] then
self:_notify_workspace_folder_added(root_dir, existing_client)
return true
end
for _, dir_clients in pairs(self._clients) do
if dir_clients[existing_client.name] then
self:_notify_workspace_folder_added(root_dir, existing_client)
return true
end
end

simply made _notify_workspace_folder_added return a boolean it will cause another prolem vsplit open two file which in two projects and mksession then nvim -S Session.vim print existing_client.initialized it will be nil when second buffer attached . that mean we can not get the
server_capabilities at that time reuse_client will return false. before use a timer to wait first server initialized then check it support workspacFolder or not . refactor mentioned add in new_config hook that doesn't make sense.

@glepnir glepnir added the bug Something isn't working label Nov 26, 2024
@jrop
Copy link

jrop commented Nov 26, 2024

Is this the successor to #3456? I'm also having an issue where multiple vtsls servers attach to a buffer upon open.

From my investigation, the issue is repeated (programmatic) calls to vim.cmd.LspStart (by a plugin). Previously, they seemed to be idempotent, but now more LSPs are started with each call to :LspStart.

I ran a bisect:

There are only 'skip'ped commits left to test.
The first bad commit could be any of:
8d9fd3581ac07a2e1940435e13bda31a0cdeb795 (this commit does not run for me at all, it gives a long error)
2eccb418f2f972ad1167f8491a8180acdeb02384

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants