neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.33k stars 956 forks source link

Remove workspace folder from langauge server when all opened resources are closed #5120

Open asmodeus812 opened 4 weeks ago

asmodeus812 commented 4 weeks ago

There should be a way to configure coc to automatically remove a workspace folder once all buffers loaded for the given workspace are unloaded/deleted/closed in vim / nvim.

fannheyward commented 2 weeks ago

What's the usage of remove workspace folder form server?

asmodeus812 commented 2 weeks ago

@fannheyward server actions would still include or report workspace folders even though all of the buffers related to that workspace folder/root have been closed. For example if i have been working on 3-4 different workspaces, once i close all resources related to one of those workspace folders, coc should send removeWorkspaceFolder to the server to gracefuly detach from it. Otherwise the language server might still consider that workspace folder "active" in some capactiy.