Skip to content

Commit

Permalink
feat: we already worked on self.editor.diagnostics no need to redo …
Browse files Browse the repository at this point in the history
…the checks
  • Loading branch information
poliorcetics committed May 22, 2023
1 parent ac80e90 commit 2915040
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions helix-term/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -974,21 +974,8 @@ impl Application {
self.editor.diagnostics.retain(|_, diags| !diags.is_empty());

// Clear any diagnostics for documents with this server open.
let urls: Vec<_> = self
.editor
.documents_mut()
.filter_map(|doc| {
if doc.supports_language_server(server_id) {
doc.clear_diagnostics(server_id);
doc.url()
} else {
None
}
})
.collect();

for url in urls {
self.editor.diagnostics.remove(&url);
for doc in self.editor.documents_mut() {
doc.clear_diagnostics(server_id);
}

// Remove the language server from the registry.
Expand Down

0 comments on commit 2915040

Please sign in to comment.