diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-12-30 15:17:17 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 15:17:17 +1100 |
commit | 8011eced141e7bf0e1eac334daf326bd49504748 (patch) | |
tree | 3d2bdd36cc4f19285ba5292b9946cdabf466d25b /cli/lsp/diagnostics.rs | |
parent | e8a81724bb3b3767edaddbe78edc52108ae78b5f (diff) |
feat(lsp): add cache command (#8911)
Diffstat (limited to 'cli/lsp/diagnostics.rs')
-rw-r--r-- | cli/lsp/diagnostics.rs | 4 |
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; |