Open
Description
/**
* The rootPath of the workspace. Is null
* if no folder is open.
*
* @deprecated in favour of `rootUri`.
*/
rootPath?: string | null;
/**
* The rootUri of the workspace. Is null if no
* folder is open. If both `rootPath` and `rootUri` are set
* `rootUri` wins.
*
* @deprecated in favour of `workspaceFolders`
*/
rootUri: DocumentUri | null;
/**
* The workspace folders configured in the client when the server starts.
* This property is only available if the client supports workspace folders.
* It can be `null` if the client supports workspace folders but none are
* configured.
*
* @since 3.6.0
*/
workspaceFolders?: WorkspaceFolder[] | null;
{
"rootPath": "/tmp/lsp/question",
"rootUri": "file:///tmp/lsp/question",
"workspaceFolders": []
}
- If
workspaceFolders
is[]
, should we ignorerootUri
androotPath
? I presume yes as it is still there and the language server should do its best to provide a trimmed down set of features and/or infer the "root" from opened files instead of deferring torootUri
and/orrootPath
.
{
"rootPath": "/tmp/lsp/question",
"rootUri": "file:///tmp/lsp/question",
"workspaceFolders": null
}
- If
workspaceFolders
isnull
, should we ignorerootUri
androotPath
? I presume yes, per the documentation that "none are configured". So we should do the same as 1 above, right?
{
"rootPath": "/no/scheme",
"rootUri": ":/no/scheme"
}
- If
workspaceFolders
is completely missing, androotUri
is""
or an invalid URI, should the server respond withInvalidParams
(-32602
) or should the server just ignore it and userootPath
? 🤔
Metadata
Metadata
Assignees
Labels
No labels