-
-
Notifications
You must be signed in to change notification settings - Fork 904
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
rust-analyzer no longer supports workspace/executeCommand #1890
Comments
I will do a fix. |
@leotaku can you give an example for code action that does not work? I tested a few and they seems to work fine when using this version: https://github.com/rust-analyzer/rust-analyzer/releases/tag/2020-07-06 |
Sure, all code actions I tried seemed to fail, so I did not specify one.
These are advertised for all structs and should be easy to reproduce. |
Sorry, I am not using rust on day to day basis, can you provide sample file to reproduce the issue? |
|
@flodiebold is correct, I did not have an up-to-date version of rust-analyzer installed. I honestly did not give it much thought, as I did not see any newer PRs/commits referencing the issue in rust-analyzer but saw very recent commits in e.g. kak-lsp that indicate they had to use custom logic. @flodiebold do you by any chance have a link to the issue where this new development is discussed? Is there any reason to still support @yyoncho Thanks for trying to step in so quickly! I am sorry for any confusion caused by my issue. |
No, there's no reason to support (Note that lsp-mode used to have support for |
Thanks @flodiebold. In that case I think it makes sense to just close this issue. |
Describe the bug
When trying to apply a code action using
lsp-execute-code-action
using a recent version of rust-analyzer, the command fails with the following error message:To Reproduce
rustup 1.21.1
cargo 1.46.0-nightly
rust-analyzer 36840bd
CARGO_HOME
, or replace it with your OS's default location)Click to expand!
lsp-execute-code-action
where a code action is advertisedExpected behavior
It would be unreasonable to expect this to work as rust-analyzer has lost support for
workspace/executeCommand
quite a while ago. (rust-analyzer/#1232)I would argue that lsp-mode should support the server-specific
rust-analyzer.applySourceChange
capability, as other client implementations (vim, kakoune) already do the same. Though I realize that this could represent additional maintenance burden. (@brotzeit and @kurnevsky, what do you think?)I also think that as long as we do not support applying the changes suggested by rust-analyzer they should not be by suggested as part of the modeline, lsp-ui or the
lsp-execute-code-action
minibuffer selection.Which Language Server did you use
lsp-rust with rust-analyzer
OS
NixOS Linux
20.09pre-git (Nightingale)
The text was updated successfully, but these errors were encountered: