Don't discover workspaces when detached files are given
This commit is contained in:
parent
c1f6a5a0b0
commit
b5f524c7ff
@ -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…
x
Reference in New Issue
Block a user