diff options
| -rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 2 | ||||
| -rw-r--r-- | editors/code/src/commands.ts | 6 | ||||
| -rw-r--r-- | editors/code/src/main.ts | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 78cd4b8e2b1..7f4b7e2a32b 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs @@ -1360,7 +1360,7 @@ pub(crate) mod command { pub(crate) fn trigger_parameter_hints() -> lsp_types::Command { lsp_types::Command { title: "triggerParameterHints".into(), - command: "editor.action.triggerParameterHints".into(), + command: "rust-analyzer.triggerParameterHints".into(), arguments: None, } } diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index b5b64e33e07..49a8ca4edba 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts @@ -87,6 +87,12 @@ export function shuffleCrateGraph(ctx: CtxInit): Cmd { }; } +export function triggerParameterHints(_: CtxInit): Cmd { + return async () => { + await vscode.commands.executeCommand("editor.action.triggerParameterHints"); + }; +} + export function matchingBrace(ctx: CtxInit): Cmd { return async () => { const editor = ctx.activeRustEditor; diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index dd439317c70..5987368e6e0 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -186,5 +186,6 @@ function createCommands(): Record<string, CommandFactory> { resolveCodeAction: { enabled: commands.resolveCodeAction }, runSingle: { enabled: commands.runSingle }, showReferences: { enabled: commands.showReferences }, + triggerParameterHints: { enabled: commands.triggerParameterHints }, }; } |
