Skip to content

fix: lsp: correctly clear workspace diagnostics on LSP(s) stop or restart - #16071

Open
poliorcetics wants to merge 3 commits into
helix-editor:masterfrom
poliorcetics:ab/fix-lsp-stop-language-servers-when-the-last-document-using-them-i/pzpsslzwylxm
Open

fix: lsp: correctly clear workspace diagnostics on LSP(s) stop or restart#16071
poliorcetics wants to merge 3 commits into
helix-editor:masterfrom
poliorcetics:ab/fix-lsp-stop-language-servers-when-the-last-document-using-them-i/pzpsslzwylxm

Conversation

@poliorcetics

@poliorcetics poliorcetics commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This also stops language servers when the last document using them is closed.

As in #16070, workspace diagnostics would accumulate infinitely when doing :lsp-restart and not disappear when doing :lsp-stop

Closes #16076

Comment thread helix-view/src/handlers/lsp.rs Outdated
@poliorcetics
poliorcetics force-pushed the ab/fix-lsp-stop-language-servers-when-the-last-document-using-them-i/pzpsslzwylxm branch from f6ac138 to f038595 Compare July 20, 2026 21:40
…tart

Before this commit, using `:lsp-stop` or `:lsp-start` would not clear
existing workspace diagnostics.
@poliorcetics
poliorcetics force-pushed the ab/fix-lsp-stop-language-servers-when-the-last-document-using-them-i/pzpsslzwylxm branch from f038595 to 5fff8d1 Compare July 25, 2026 09:30
Comment thread helix-term/src/commands/typed.rs Outdated
@poliorcetics
poliorcetics force-pushed the ab/fix-lsp-stop-language-servers-when-the-last-document-using-them-i/pzpsslzwylxm branch from 54faf82 to 01083f1 Compare August 17, 2026 20:15
This avoids duplicating the logic of argument checking and LSP selection
@poliorcetics
poliorcetics force-pushed the ab/fix-lsp-stop-language-servers-when-the-last-document-using-them-i/pzpsslzwylxm branch from 01083f1 to fc705f1 Compare August 18, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lsp-restart duplicates diagnostics

3 participants