State that the WorkspaceClientCapabilites's applyEdit capability is enabled - #55
Merged
Conversation
akosyakov
reviewed
Feb 12, 2018
| export class MonacoWorkspace implements Workspace { | ||
|
|
||
| public readonly capabilities: WorkspaceClientCapabilites = { | ||
| applyEdit: true |
Contributor
There was a problem hiding this comment.
nice catch! I think documentChanges are covered by applyEdit as well. Could you add them to capabilities please:
applyEdit: true,
workspaceEdit: {
documentChanges: true
}
Contributor
Author
There was a problem hiding this comment.
@akosyakov Actually, the documentChanges support isn't perfect right now.
monaco-languageclient/src/converter.ts
Lines 293 to 298 in aa74043
We just convert them into IResourceEdits without checking if the version from the language server matches what's in the Monaco Editor. I am planning to address this (as well as updating the capabilities) in a separate pull request.
Pull request TypeFox#21 added support for the workspace/applyEdit capability so it should be stated as such in the WorkspaceClientCapabilities. Signed-off-by: Remy Suen <remy.suen@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #21 support for the
workspace/applyEditrequest was added so the client should state this fact in itsWorkspaceClientCapabilites.My language server will only provide code actions if the client supports
workspace/applyEditrequests so I need this to be enabled correctly so that my language server will work with this editor.