mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
fix: correctly reset inlay hints when stopping or restarting LSPs for a document (#10741)
This commit is contained in:
parent
179673568d
commit
972265640d
@ -1495,6 +1495,8 @@ 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(Some(client.id()));
|
||||
doc.reset_all_inlay_hints();
|
||||
doc.inlay_hints_oudated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1356,6 +1356,7 @@ pub fn refresh_doc_language(&mut self, doc_id: DocumentId) {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user