mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 11:20:54 +00:00
fix: only show debug lens with a valid root
This commit is contained in:
parent
693b110e3d
commit
59e3d6684b
@ -1584,7 +1584,9 @@ pub(crate) fn code_lens(
|
||||
};
|
||||
|
||||
let lens_config = snap.config.lens();
|
||||
if lens_config.run && client_commands_config.run_single && has_root {
|
||||
|
||||
if has_root {
|
||||
if lens_config.run && client_commands_config.run_single {
|
||||
let command = command::run_single(&r, &title);
|
||||
acc.push(lsp_types::CodeLens {
|
||||
range: annotation_range,
|
||||
@ -1600,6 +1602,8 @@ pub(crate) fn code_lens(
|
||||
data: None,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if lens_config.interpret {
|
||||
let command = command::interpret_single(&r);
|
||||
acc.push(lsp_types::CodeLens {
|
||||
|
Loading…
x
Reference in New Issue
Block a user