Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/rust-analyzer/src/to_proto.rs5
-rw-r--r--editors/code/src/main.ts2
2 files changed, 5 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index 81cc1952ba..d1f805af1d 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -1164,7 +1164,10 @@ 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,
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index 25f1e83d10..01a1a2db7f 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -79,7 +79,7 @@ async function activateServer(ctx: Ctx): Promise<RustAnalyzerExtensionApi> {
);
vscode.workspace.onDidChangeConfiguration(
async (_) => {
- await ctx.client?.sendNotification("workspace/didChangeConfiguration", {
+ await ctx.client?.sendNotification(lc.DidChangeConfigurationNotification.type, {
settings: "",
});
},