-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix: check server supported workspaceFolders #2418
Conversation
Looks like there's some infinite loop or something similar? Had to kill nvim process.
|
fixed. |
Now
But there should be one client for buffers (18, 21) and one for (17, 26). Note that I haven't changed |
something wrong mabye I didn't test it. I will fix it tomorrow. about cmd or on_new_config it's okay . this way will spawn multiple server if server does not have |
a small mistake .sorry.. |
I tried with the new version but still getting the same behavior. I tried debugging but haven't found the reason. It looks like all servers are spawned, just are not being attached to buffers. Only the first spawned My test case is:
Result: there are 4 seprate |
fixed ..I forget attached it after spawn new one. |
Now it works in the sense that
Then when I e.g. use "go to definition" to another file a new But it should look like this:
|
I noticed that will try to fix it later . |
fixed. |
1 similar comment
fixed. |
notice this pr just fix the |
I think there is still some problem as now it looks like this:
If it helps the buffers were opened in order: 29, 36, 41, 56.
I know, it makes sense to check |
fixed. |
Thanks, now it works. |
this commit broke tsserver, it spawns a new server whenever i use go to definition with tsserver, this happens only on windows, tested the same project with wsl and it works without spawning a new server |
rewrite the spawn the server instance logic.
clients
cache the server instance id with root , key is root dir value is all clients id which attached this root dir .clients
workspaceFolders
byvim.tbl_get(client, 'server_capabilities', 'workspace', 'workspaceFolders', 'supported')
if true mean client supporthttps://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_workspaceFolders
notice there has a timer for some situation .like load from session .