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

Check that the client supports workspace/applyEdit before using it #183

Closed
rcjsuen opened this issue Oct 6, 2017 · 2 comments
Closed

Check that the client supports workspace/applyEdit before using it #183

rcjsuen opened this issue Oct 6, 2017 · 2 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Oct 6, 2017

Currently, the server assumes that the client supports workspace/applyEdit requests without checking that the feature is specified and enabled in the initialization parameters. As our code actions currently all manipulate the underlying document via a workspace/applyEdit request, we should not provide any code actions if the feature is not supported on the client.

https://github.com/rcjsuen/dockerfile-language-server-nodejs/blob/05d16f7ec9c4b594ca3cfda541cd6a6d33193df2/src/server.ts#L344-L353

@rcjsuen rcjsuen added the bug label Oct 6, 2017
@rcjsuen
Copy link
Owner Author

rcjsuen commented Oct 11, 2017

Tried to write a test for this but I got hit by microsoft/vscode-languageserver-node#262.

@rcjsuen rcjsuen self-assigned this Oct 12, 2017
@rcjsuen
Copy link
Owner Author

rcjsuen commented Oct 14, 2017

Looks like this change has caused the language server to not provide any code actions on vscode-languageclient versions 3.4.0 and up. Please see microsoft/vscode-languageserver-node#263.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant