From e6ea395fb0635dbe206d7004fb720dd84516bc4f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 11 Jul 2020 01:39:06 +0200 Subject: Don't show error when speculatively reloading workspace --- crates/rust-analyzer/src/reload.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index 4e7d5be79..ab1b18ea9 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs @@ -126,10 +126,12 @@ impl GlobalState { res.map_err(|err| { has_errors = true; log::error!("failed to load workspace: {:#}", err); - self.show_message( - lsp_types::MessageType::Error, - format!("rust-analyzer failed to load workspace: {:#}", err), - ); + if self.workspaces.is_empty() { + self.show_message( + lsp_types::MessageType::Error, + format!("rust-analyzer failed to load workspace: {:#}", err), + ); + } }) .ok() }) -- cgit v1.2.3