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

Tombstone LSP clients stopped with :lsp-stop #11321

Merged
merged 2 commits into from
Jul 28, 2024
Merged

Conversation

the-mikedavis
Copy link
Member

Currently if you stop language server(s) for a file with :lsp-stop and then open another file from that language, the language server(s) will be restarted. Instead of removing the language server info entirely when we :lsp-stop, we can replace the records in the registry with a "tombstone" which prevents automatic restarts by Registry::get.

Closes #11319

Servers stopped with `:lsp-stop` will show this message when the server
exits. If the client isn't in the registry there isn't any work to do
to remove it so this branch is benign.
@the-mikedavis the-mikedavis added the A-language-server Area: Language server client label Jul 25, 2024
@the-mikedavis the-mikedavis changed the title Tombstore LSP clients stopped with :lsp-stop Tombstone LSP clients stopped with :lsp-stop Jul 25, 2024
helix-lsp/src/lib.rs Outdated Show resolved Hide resolved
We use the empty vec in `inner_by_name` as a tombstone value. When the
vec is empty `get` should not automatically restart the server.
@the-mikedavis the-mikedavis force-pushed the lsp-registry-tombstone branch from 79ed9e3 to 48efdd4 Compare July 25, 2024 19:55
@archseer archseer merged commit ae72a1d into master Jul 28, 2024
6 checks passed
@archseer archseer deleted the lsp-registry-tombstone branch July 28, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lsp-stop should stop the lsp without it restarting afterwards. + lsp-start
3 participants