rust-analyzer
rust-analyzer copied to clipboard
Run | Debug duplicates
On emacs, When I try to write a test something like this:
#[test]
fn test_
Every time I press space a new Run Test | Debug
appears next to it like this. I think the problem is with runnables.rs
I'm using rust-analyzer version:
rust-analyzer 2021-10-18
Is there a way that i can disable this feature on emacs, if it's not fixable?
Can't reproduce this in VSCode so this sounds like a bug in the client code you use for emacs.
Have you tried it for emacs? I don't think there's any problem with my config for emacs
I don't have an emacs set up so no. Fwiw you can disable runnable test lenses with the rust-analyzer.lens.run
for the time being(rust-analyzer.lens.enable
for all lenses in general).
What do you mean? What's rust-analyzer.lens.run
?
rust-analyzer.lens.run
is a configuration option. I don't know how to set them using whichever lsp extension you use for emacs however.
As bjorn said, its a config to disable the corresponding lenses. (I apologize for dropping that word by accident when I typed that 😅)
I was trying to turn off the Debug/Run "lens" as it's too distracting, but couldn't find a way to turn off that in emacs (I think the option is not exposed in emacs, i.e. in lsp-rust.el
).
The only way I've found to turn off this is by turning off lenses altogether, by adding the following to the emacs config file:
(setq lsp-lens-enable nil)
as documented in https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/
Do you still encounter this problem?