Skip to content

Client does not declare that clientCapabilities.workspace.workspaceEdit.documentChanges is supported#307

Merged
dbaeumer merged 1 commit intomicrosoft:masterfrom
rcjsuen:documentChanges
Feb 9, 2018
Merged

Client does not declare that clientCapabilities.workspace.workspaceEdit.documentChanges is supported#307
dbaeumer merged 1 commit intomicrosoft:masterfrom
rcjsuen:documentChanges

Conversation

@rcjsuen
Copy link
Contributor

@rcjsuen rcjsuen commented Feb 9, 2018

https://github.com/Microsoft/vscode-languageserver-node/blob/f4595fa4f3a52c9210792c7b412f9e2ee478cdd3/client/src/client.ts#L2945-L2955

As seen in the code above, we can see that documentChanges are supported and are handled by the VS Code LSP client. However, this capability is not stated in the initialization parameters that the LSP client sends to a language server. It used to be sent but it was commented out and later removed. This is basically the same problem as #263 just for a different capability. This pull request adds the capability back to the initialization parameters and fixes #306.

Since the vscode-languageclient package supports versioned edits in a
WorkspaceEdit sent in a workspace/applyEdit request, it should be
stated as such in the client's initialiation parameters. This will
allow supporting language servers to get the right information from
VS Code and to then send back versioned edits instead of regular
edits without any versioning.

Signed-off-by: Remy Suen <[email protected]>
@rcjsuen rcjsuen mentioned this pull request Feb 9, 2018
@dbaeumer dbaeumer merged commit bf6ad9d into microsoft:master Feb 9, 2018
@rcjsuen rcjsuen deleted the documentChanges branch February 9, 2018 22:04
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.

setting Capabilites

2 participants