diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/lsp/config.rs | 3 | ||||
-rw-r--r-- | cli/schemas/config-file.v1.json | 26 |
2 files changed, 23 insertions, 6 deletions
diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs index 481273930..d207b81a9 100644 --- a/cli/lsp/config.rs +++ b/cli/lsp/config.rs @@ -1534,11 +1534,12 @@ impl ConfigData { let workspace = config_file .as_ref() - .and_then(|c| c.json.workspace.as_ref().map(|w| (c, w))); + .and_then(|c| c.to_workspace_config().ok().flatten().map(|w| (c, w))); let is_workspace_root = workspace.is_some(); let workspace_members = if let Some((config, workspace)) = workspace { Arc::new( workspace + .members .iter() .flat_map(|p| { let dir_specifier = config.specifier.join(p).ok()?; diff --git a/cli/schemas/config-file.v1.json b/cli/schemas/config-file.v1.json index 84e65fc77..96a95ca16 100644 --- a/cli/schemas/config-file.v1.json +++ b/cli/schemas/config-file.v1.json @@ -605,11 +605,27 @@ ] }, "workspace": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The members of this workspace." + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "description": "The members of this workspace." + }, + { + "type": "object", + "properties": { + "members": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The members of this workspace." + } + } + } + ] } } } |