support `workspace/executeCommand`
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: 563401ceb2a9533572666b5a08a64c34b08e6fbc 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.
I'm still unclear what workspace/executeCommand does. Do you have a detailed example?
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
f3e9e756e182b122bef8826a77047f6ccf5529b6 added one executeCommand but there are more.
The serialization of different commands seems hard
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!