-
Notifications
You must be signed in to change notification settings - Fork 184
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
Support dynamic capabilities #372
Comments
This is definitely a major mechanism LSP is missing, I'd like to understand it a bit more. I see the benefit of capability registration for server-initiated behaviour. |
I believe they want it to be an explicit opt-in feature where it is disabled by default because it is in an experimental state. |
Vscode-json-languageserver requires dynamic capability registration to support range formatting:
|
Ah good, another example: In this case the server wants to check client-sent settings before enabling a capability, and that cannot be done while replying to "initialize". The Metals server uses it with the "documentSelector" parameter for the watched files API, that also makes sense. Perhaps we can pick some of these capabilities to be not statically enabled. |
This is in master now. |
Some servers rely on the
client/registerCapability
message to enable features dynamically. It would be nice if the plugin supported this.In my particular use case, RLS (rust) needs this to support range formatting. The initialization indicates it is initially not supported, and it is not turned on until
didChangeConfiguration
is sent with certain settings, after which it sends aregisterCapability
to indicate that range formatting is now enabled.The text was updated successfully, but these errors were encountered: