mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-14 17:07:26 +00:00
Check for workspace root in runnable codelens
This commit is contained in:
parent
8661740626
commit
2174aca8f8
1 changed files with 1 additions and 1 deletions
|
@ -1164,7 +1164,7 @@ pub(crate) fn code_lens(
|
|||
let r = runnable(snap, run)?;
|
||||
|
||||
let lens_config = snap.config.lens();
|
||||
if lens_config.run && client_commands_config.run_single {
|
||||
if lens_config.run && client_commands_config.run_single && r.args.workspace_root.is_some() {
|
||||
let command = command::run_single(&r, &title);
|
||||
acc.push(lsp_types::CodeLens {
|
||||
range: annotation_range,
|
||||
|
|
Loading…
Reference in a new issue