You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarification on workspace folders and roots in the initialize request #2154
/** * 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;
If workspaceFolders is [], should we ignore rootUri and rootPath? 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 to rootUri and/or rootPath.
If workspaceFolders is null, should we ignore rootUri and rootPath? I presume yes, per the documentation that "none are configured". So we should do the same as 1 above, right?
If workspaceFolders is completely missing, and rootUri is "" or an invalid URI, should the server respond with InvalidParams (-32602) or should the server just ignore it and use rootPath? 🤔
Activity