Skip to content

Commit 2e86029

Browse files
committed
Auto merge of rust-lang#14147 - Veykril:completion, r=Veykril
Don't assume VSCode internal commands in the server
2 parents 4456800 + 95fa278 commit 2e86029

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

crates/rust-analyzer/src/to_proto.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ pub(crate) mod command {
13601360
pub(crate) fn trigger_parameter_hints() -> lsp_types::Command {
13611361
lsp_types::Command {
13621362
title: "triggerParameterHints".into(),
1363-
command: "editor.action.triggerParameterHints".into(),
1363+
command: "rust-analyzer.triggerParameterHints".into(),
13641364
arguments: None,
13651365
}
13661366
}

editors/code/src/commands.ts

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ export function shuffleCrateGraph(ctx: CtxInit): Cmd {
8787
};
8888
}
8989

90+
export function triggerParameterHints(_: CtxInit): Cmd {
91+
return async () => {
92+
await vscode.commands.executeCommand("editor.action.triggerParameterHints");
93+
};
94+
}
95+
9096
export function matchingBrace(ctx: CtxInit): Cmd {
9197
return async () => {
9298
const editor = ctx.activeRustEditor;

editors/code/src/main.ts

+1
Original file line numberDiff line numberDiff line change
@@ -186,5 +186,6 @@ function createCommands(): Record<string, CommandFactory> {
186186
resolveCodeAction: { enabled: commands.resolveCodeAction },
187187
runSingle: { enabled: commands.runSingle },
188188
showReferences: { enabled: commands.showReferences },
189+
triggerParameterHints: { enabled: commands.triggerParameterHints },
189190
};
190191
}

0 commit comments

Comments
 (0)