aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r--helix-term/src/commands/typed.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index f530ce10..208854e8 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -1502,7 +1502,7 @@ fn lsp_stop(
for doc in cx.editor.documents_mut() {
if let Some(client) = doc.remove_language_server_by_name(ls_name) {
- doc.clear_diagnostics(client.id());
+ doc.clear_diagnostics(Some(client.id()));
}
}
}
@@ -2008,6 +2008,10 @@ fn language(
let id = doc.id();
cx.editor.refresh_language_servers(id);
+ let doc = doc_mut!(cx.editor);
+ let diagnostics =
+ Editor::doc_diagnostics(&cx.editor.language_servers, &cx.editor.diagnostics, doc);
+ doc.replace_diagnostics(diagnostics, &[], None);
Ok(())
}