Check for workspace root in runnable codelens

This commit is contained in:
Maria José Solano 2022-11-27 10:07:09 -08:00
parent 8661740626
commit 2174aca8f8

View file

@ -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,