From 1f9e9002d527022130e4deba0b34b1ba466216d8 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Mon, 8 Feb 2021 21:45:46 +1100 Subject: [PATCH] fix(lsp): prepare diagnostics when the config changes (#9438) --- cli/lsp/language_server.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index aa52866095..91613d21a5 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -698,10 +698,6 @@ impl Inner { self.performance.measure(mark); } - async fn did_save(&self, _params: DidSaveTextDocumentParams) { - // nothing to do yet... cleanup things? - } - async fn did_change_configuration( &mut self, params: DidChangeConfigurationParams, @@ -745,6 +741,9 @@ impl Inner { .show_message(MessageType::Warning, err.to_string()) .await; } + if let Err(err) = self.prepare_diagnostics().await { + error!("{}", err); + } } else { error!("received empty extension settings from the client"); } @@ -1697,10 +1696,6 @@ impl lspower::LanguageServer for LanguageServer { self.0.lock().await.did_close(params).await } - async fn did_save(&self, params: DidSaveTextDocumentParams) { - self.0.lock().await.did_save(params).await - } - async fn did_change_configuration( &self, params: DidChangeConfigurationParams,