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

ClientCapabilities should inform ServerCapabilities #4130

Closed
kjeremy opened this issue Apr 24, 2020 · 0 comments · Fixed by #4516
Closed

ClientCapabilities should inform ServerCapabilities #4130

kjeremy opened this issue Apr 24, 2020 · 0 comments · Fixed by #4516

Comments

@kjeremy
Copy link
Contributor

kjeremy commented Apr 24, 2020

The LSP specifies that the client should first send an initialize request which contains the client capabilities. At that point the server capabilities should be sent back.

It turns out that the server capabilities can be informed by the client capabilities. For instance the client capability textDocument.codeAction.codeActionLiteralSupport informs the server whether the server capability codeActionProvider should be the boolean true or CodeActionOptions.

This is not obvious in the vscode-languageclient-node interfaces but appears to be how the built-in servers in vscode behave.

Example: https://github.com/microsoft/vscode/blob/1476c4e20b385059ca63c871257f56c6d387ad03/extensions/css-language-features/server/src/cssServerMain.ts#L128

While looking at #144

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 a pull request may close this issue.

1 participant