mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 07:04:22 +00:00
Auto merge of #17177 - hermannm:fix-run-lens-config, r=Veykril
Fix Run lens showing when lenses are disabled I have disabled Rust Analyzer lenses in my VSCode settings, but noticed that the `Run` lens still showed. This surprised me, as the docs for `lens.run.enable` [state that it only applies when `lens.enable` is set](25f59be62f/crates/rust-analyzer/src/config.rs (L353-L355)
). I then found that where we set `LensConfig::run`, we don't check `lens_enable` like for the other settings. [We did this previously](eab385e1f6/crates/rust-analyzer/src/config.rs (L1649)
), so this seems like a regression from refactoring. This PR tries to fix that.
This commit is contained in:
commit
c80006af57
1 changed files with 1 additions and 1 deletions
|
@ -1776,7 +1776,7 @@ impl Config {
|
|||
|
||||
pub fn lens(&self) -> LensConfig {
|
||||
LensConfig {
|
||||
run: *self.lens_run_enable(),
|
||||
run: *self.lens_enable() && *self.lens_run_enable(),
|
||||
debug: *self.lens_enable() && *self.lens_debug_enable(),
|
||||
interpret: *self.lens_enable() && *self.lens_run_enable() && *self.interpret_tests(),
|
||||
implementations: *self.lens_enable() && *self.lens_implementations_enable(),
|
||||
|
|
Loading…
Reference in a new issue