summaryrefslogtreecommitdiff
path: root/cli/lsp/diagnostics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/lsp/diagnostics.rs')
-rw-r--r--cli/lsp/diagnostics.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs
index ac938d063..e7be61cdc 100644
--- a/cli/lsp/diagnostics.rs
+++ b/cli/lsp/diagnostics.rs
@@ -60,6 +60,10 @@ impl DiagnosticCollection {
self.versions.get(file_id).cloned()
}
+ pub fn invalidate(&mut self, file_id: &FileId) {
+ self.versions.remove(file_id);
+ }
+
pub fn take_changes(&mut self) -> Option<HashSet<FileId>> {
if self.changes.is_empty() {
return None;