diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/src/bin/main.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs index 7ee35d52b..6c883dd58 100644 --- a/crates/rust-analyzer/src/bin/main.rs +++ b/crates/rust-analyzer/src/bin/main.rs | |||
@@ -199,7 +199,7 @@ fn run_server() -> Result<()> { | |||
199 | config.update(json); | 199 | config.update(json); |
200 | } | 200 | } |
201 | 201 | ||
202 | if config.linked_projects().is_empty() { | 202 | if config.linked_projects().is_empty() && config.detached_files().is_empty() { |
203 | let workspace_roots = initialize_params | 203 | let workspace_roots = initialize_params |
204 | .workspace_folders | 204 | .workspace_folders |
205 | .map(|workspaces| { | 205 | .map(|workspaces| { |
@@ -214,10 +214,9 @@ fn run_server() -> Result<()> { | |||
214 | 214 | ||
215 | let discovered = ProjectManifest::discover_all(&workspace_roots); | 215 | let discovered = ProjectManifest::discover_all(&workspace_roots); |
216 | log::info!("discovered projects: {:?}", discovered); | 216 | log::info!("discovered projects: {:?}", discovered); |
217 | if discovered.is_empty() && config.detached_files().is_empty() { | 217 | if discovered.is_empty() { |
218 | log::error!("failed to find any projects in {:?}", workspace_roots); | 218 | log::error!("failed to find any projects in {:?}", workspace_roots); |
219 | } | 219 | } |
220 | |||
221 | config.discovered_projects = Some(discovered); | 220 | config.discovered_projects = Some(discovered); |
222 | } | 221 | } |
223 | 222 | ||