mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 16:06:39 +03:00
Declare workspaceFolders support in server capabilities (#4666)
* Declare workspaceFolders support in server capabilities The `vscode-languageserver-node` dependency will attempt dynamic capability registration for workspace folder change notifications if this `workspace.workspaceFolders.changeNotifications` is not set in the `InitializeResult`. That is problematic for clients that don't support dynamic capability registration: if we send a JSONRPC error, the server will exit because of the rejected promise. The server has support for workspace folders and requests and uses change notifications as far as I can see, so I believe it's more correct to declare support for these up-front anyways. * Fix formatting --------- Co-authored-by: Heejae Chang <1333179+heejaechang@users.noreply.github.com> Co-authored-by: Eric Traut <eric@traut.com>
This commit is contained in:
parent
02b4c17b24
commit
7ef5bf86f0
@ -756,6 +756,12 @@ export abstract class LanguageServerBase implements LanguageServerInterface {
|
||||
workDoneProgress: true,
|
||||
},
|
||||
callHierarchyProvider: true,
|
||||
workspace: {
|
||||
workspaceFolders: {
|
||||
supported: true,
|
||||
changeNotifications: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user