Unnamed repository; edit this file 'description' to name the repository.
Check for workspace root in runnable codelens
Maria José Solano 2022-11-28
parent 8661740 · commit 2174aca
-rw-r--r--crates/rust-analyzer/src/to_proto.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index 81cc1952ba..fcc4d7be24 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -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,