Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare workspaceFolders support in server capabilities #18

Merged

Conversation

the-mikedavis
Copy link
Contributor

This is the recommended way to declare up-front that the server supports workspace folders and is interested in change notifications. Without this server capability set, the vscode-languageserver-node dependency tries to register for workspace change notifications dynamically with a 'client/registerCapability' request. If the client doesn't support dynamic capability registration and responds to that request with a MethodNotHandled JSONRPC error, the promise for the request is rejected which causes the server to exit.

Also see this similar change in pyright microsoft/pyright#4666

This is the recommended way to declare up-front that the server
supports workspace folders and is interested in change notifications.
Without this server capability set, the vscode-languageserver-node
dependency tries to register for workspace change notifications
dynamically with a 'client/registerCapability' request. If the client
doesn't support dynamic capability registration and responds to that
request with a MethodNotHandled JSONRPC error, the promise for the
request is rejected which causes the server to exit.
@johnsoncodehk johnsoncodehk merged commit e5a7be8 into volarjs:master Mar 13, 2023
@johnsoncodehk
Copy link
Member

Thanks!

@the-mikedavis the-mikedavis deleted the md-declare-workspace-folder-support branch March 13, 2023 14:07
This was referenced Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants