Mercurial > forks > helix
changeset 5784:416c736004e1
fix: correctly reset inlay hints when stopping or restarting LSPs for a document (#10741)
author | Poliorcetics <poliorcetics@users.noreply.github.com> |
---|---|
date | Sun, 02 Jun 2024 17:39:48 +0200 |
parents | ae032eb18198 |
children | 9f9bc6f4d995 |
files | helix-term/src/commands/typed.rs helix-view/src/editor.rs |
diffstat | 2 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/helix-term/src/commands/typed.rs Tue May 28 21:15:53 2024 +1000 +++ b/helix-term/src/commands/typed.rs Sun Jun 02 17:39:48 2024 +0200 @@ -1495,6 +1495,8 @@ for doc in cx.editor.documents_mut() { if let Some(client) = doc.remove_language_server_by_name(ls_name) { doc.clear_diagnostics(Some(client.id())); + doc.reset_all_inlay_hints(); + doc.inlay_hints_oudated = true; } } }
--- a/helix-view/src/editor.rs Tue May 28 21:15:53 2024 +1000 +++ b/helix-view/src/editor.rs Sun Jun 02 17:39:48 2024 +0200 @@ -1356,6 +1356,7 @@ let doc = doc_mut!(self, &doc_id); let diagnostics = Editor::doc_diagnostics(&self.language_servers, &self.diagnostics, doc); doc.replace_diagnostics(diagnostics, &[], None); + doc.reset_all_inlay_hints(); } /// Launch a language server for a given document