diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/src/reload.rs | 10 |
1 files 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 { | |||
126 | res.map_err(|err| { | 126 | res.map_err(|err| { |
127 | has_errors = true; | 127 | has_errors = true; |
128 | log::error!("failed to load workspace: {:#}", err); | 128 | log::error!("failed to load workspace: {:#}", err); |
129 | self.show_message( | 129 | if self.workspaces.is_empty() { |
130 | lsp_types::MessageType::Error, | 130 | self.show_message( |
131 | format!("rust-analyzer failed to load workspace: {:#}", err), | 131 | lsp_types::MessageType::Error, |
132 | ); | 132 | format!("rust-analyzer failed to load workspace: {:#}", err), |
133 | ); | ||
134 | } | ||
133 | }) | 135 | }) |
134 | .ok() | 136 | .ok() |
135 | }) | 137 | }) |