diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-07-25 15:33:42 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-25 15:33:42 +1000 |
commit | 72ac9c3ae0c5db99af1e1f5d2191fb82dc092acd (patch) | |
tree | d1120201acc158155ea9a76d4b7896221489c9e9 /cli/lsp/diagnostics.rs | |
parent | 74c7559d2029539eb6ab7459c06061c00b3e0c1a (diff) |
fix(lsp): handle importmaps properly (#11496)
Fixes: #11146
Fixes: #11456
Fixes: #10439
Diffstat (limited to 'cli/lsp/diagnostics.rs')
-rw-r--r-- | cli/lsp/diagnostics.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index 18cff6ea7..a7051ddf1 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -122,11 +122,16 @@ impl DiagnosticsServer { pub(crate) async fn invalidate(&self, specifiers: Vec<ModuleSpecifier>) { let mut collection = self.collection.lock().await; - for specifier in specifiers { - collection.versions.remove(&specifier); + for specifier in &specifiers { + collection.versions.remove(specifier); } } + pub(crate) async fn invalidate_all(&self) { + let mut collection = self.collection.lock().await; + collection.versions.clear(); + } + pub(crate) fn start( &mut self, language_server: Arc<Mutex<language_server::Inner>>, |