Skip to content

Commit 3769cc3

Browse files
committed
Auto merge of #13686 - MariaSolOs:test-lenses, r=Veykril
Don't show runnable code lenses in libraries outside of the workspace Addresses #13664. For now I'm just disabling runnable code lenses since the ones that display the number of references and implementations do work correctly with external code. Also made a tiny TypeScript change to use the typed `sendNotification` overload.
2 parents 6d61be8 + 9914d30 commit 3769cc3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

crates/rust-analyzer/src/to_proto.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,10 @@ pub(crate) fn code_lens(
11641164
let r = runnable(snap, run)?;
11651165

11661166
let lens_config = snap.config.lens();
1167-
if lens_config.run && client_commands_config.run_single {
1167+
if lens_config.run
1168+
&& client_commands_config.run_single
1169+
&& r.args.workspace_root.is_some()
1170+
{
11681171
let command = command::run_single(&r, &title);
11691172
acc.push(lsp_types::CodeLens {
11701173
range: annotation_range,

editors/code/src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async function activateServer(ctx: Ctx): Promise<RustAnalyzerExtensionApi> {
7979
);
8080
vscode.workspace.onDidChangeConfiguration(
8181
async (_) => {
82-
await ctx.client?.sendNotification("workspace/didChangeConfiguration", {
82+
await ctx.client?.sendNotification(lc.DidChangeConfigurationNotification.type, {
8383
settings: "",
8484
});
8585
},

0 commit comments

Comments
 (0)