mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
Don't discover workspaces when detached files are given
This commit is contained in:
parent
c1f6a5a0b0
commit
b5f524c7ff
1 changed files with 2 additions and 3 deletions
|
@ -199,7 +199,7 @@ fn run_server() -> Result<()> {
|
|||
config.update(json);
|
||||
}
|
||||
|
||||
if config.linked_projects().is_empty() {
|
||||
if config.linked_projects().is_empty() && config.detached_files().is_empty() {
|
||||
let workspace_roots = initialize_params
|
||||
.workspace_folders
|
||||
.map(|workspaces| {
|
||||
|
@ -214,10 +214,9 @@ fn run_server() -> Result<()> {
|
|||
|
||||
let discovered = ProjectManifest::discover_all(&workspace_roots);
|
||||
log::info!("discovered projects: {:?}", discovered);
|
||||
if discovered.is_empty() && config.detached_files().is_empty() {
|
||||
if discovered.is_empty() {
|
||||
log::error!("failed to find any projects in {:?}", workspace_roots);
|
||||
}
|
||||
|
||||
config.discovered_projects = Some(discovered);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue