Skip to content

Update WorkspaceClientCapabilities to state that WorkspaceEdit's documentChanges is supported - #56

Merged
rcjsuen merged 1 commit into
TypeFox:masterfrom
rcjsuen:documentChanges
Feb 12, 2018
Merged

Update WorkspaceClientCapabilities to state that WorkspaceEdit's documentChanges is supported#56
rcjsuen merged 1 commit into
TypeFox:masterfrom
rcjsuen:documentChanges

Conversation

@rcjsuen

@rcjsuen rcjsuen commented Feb 12, 2018

Copy link
Copy Markdown
Contributor

Support for workspace/applyEdit was added in #21 but the capabilities of the client was not updated to include workspaceEdit: { documentChanges: true }. This pull request adds this to the capabilities so that servers will know that this client supports this feature.

In an earlier comment I had stated that our support for documentChanges was incomplete because no version checking was made. However, I was wrong because the versions were being checked by vscode-base-languageclient.

https://github.com/TypeFox/vscode-languageserver-node/blob/e0c1f194dabede0409f0d8f4e4e2eeccc65e1535/client/src/base.ts#L1502-L1512

Hence, the versions of the documentChanges have actually already been verified by the time they get to our applyEdit function implementation.

Sorry for the any confusion that I may have caused.

As this LSP client supports WorkspaceEdit's documentChanges, this
should be declared as a capability so that servers know that it is
okay to send this request to this client.

Signed-off-by: Remy Suen <remy.suen@gmail.com>

@akosyakov akosyakov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's fine, thank you again!

@rcjsuen
rcjsuen merged commit cfacfcc into TypeFox:master Feb 12, 2018
@rcjsuen
rcjsuen deleted the documentChanges branch February 12, 2018 08:54
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