Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

support workspace/executeCommand #283

Open
topisani opened this issue Jan 10, 2018 · 4 comments
Open

support workspace/executeCommand #283

topisani opened this issue Jan 10, 2018 · 4 comments

Comments

@topisani
Copy link
Contributor

topisani commented Jan 10, 2018

Currently textDocument/codeAction and textDocument/codeLens respond with commands consisting of textedits that should be applied by the client. however, they are supposed to respond with commands that can be sent back to the server using workspace/executeCommand, and this is what at least lsp-mode does.

To support code actions and code lenses correctly, we should respond to workspace/executeCommand. Doing so is simple, we can just quickly reply with a a workspace/applyEdit containing what is currently sent with the codeAction, and for code lenses, we would reply with DocumentHighlights.

Edit: 563401c mitigates this in emacs, by overwriting some lsp-mode functions when cquery is enabled. This works, and should work with non-cquery aware tools too (tested with lsp-ui). the vscode plugin has something similar, not sure about neovim though.

@MaskRay
Copy link
Contributor

MaskRay commented Jan 17, 2018

I'm still unclear what workspace/executeCommand does. Do you have a detailed example?

@topisani
Copy link
Contributor Author

It executes commands - its a common interface for sending custom commands to the server, custom commands like applying a codeaction or jumping to a specific kind of reference

@MaskRay
Copy link
Contributor

MaskRay commented Mar 8, 2018

f3e9e75 added one executeCommand but there are more.

The serialization of different commands seems hard

@ddovod
Copy link

ddovod commented Jan 29, 2019

Hi guys. I'm experiencing the same issue with the latest lsp-mode, lsp-ui and cquery. When I'm trying to apply Fixit Pick one of N includes to insert, it says

Error from the Language Server: Fail to parse ’workspace/executeCommand’ /params/comman, expected std::string (Invalid Parameters)

Or probably I'm missing something?
Thank you very much!

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

No branches or pull requests

3 participants