diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-05-20 19:56:48 +1000 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2021-05-31 16:37:32 +0200 |
commit | 176075980bfdc8b07f70db3229bd2df9b6ace018 (patch) | |
tree | 192bd9d478a75ef9b84eea1fbb3692d0c8ae29a8 /cli/lsp/diagnostics.rs | |
parent | 67cf683aad7d6fb7b0dc741267585c991b8be847 (diff) |
fix(lsp): re-enable the per resource configuration without a deadlock (#10625)
Fixes #10603
Diffstat (limited to 'cli/lsp/diagnostics.rs')
-rw-r--r-- | cli/lsp/diagnostics.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index 33705dbff..ea781abde 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -170,7 +170,7 @@ impl DiagnosticsServer { dirty = false; debounce_timer.as_mut().reset(Instant::now() + NEVER); - let snapshot = language_server.lock().await.snapshot(); + let snapshot = language_server.lock().await.snapshot().unwrap(); update_diagnostics( &client, collection.clone(), @@ -314,7 +314,7 @@ async fn generate_lint_diagnostics( collection: Arc<Mutex<DiagnosticCollection>>, ) -> Result<DiagnosticVec, AnyError> { let documents = snapshot.documents.clone(); - let workspace_settings = snapshot.config.workspace_settings.clone(); + let workspace_settings = snapshot.config.settings.workspace.clone(); tokio::task::spawn(async move { let mut diagnostics_vec = Vec::new(); if workspace_settings.lint { @@ -487,7 +487,7 @@ async fn publish_diagnostics( if let Some(changes) = collection.take_changes() { for specifier in changes { let mut diagnostics: Vec<lsp::Diagnostic> = - if snapshot.config.workspace_settings.lint { + if snapshot.config.settings.workspace.lint { collection .get(&specifier, DiagnosticSource::DenoLint) .cloned() |