mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Don't assume VSCode internal commands in the server
This commit is contained in:
parent
44568007d1
commit
95fa278f30
@ -1360,7 +1360,7 @@ pub(crate) mod command {
|
|||||||
pub(crate) fn trigger_parameter_hints() -> lsp_types::Command {
|
pub(crate) fn trigger_parameter_hints() -> lsp_types::Command {
|
||||||
lsp_types::Command {
|
lsp_types::Command {
|
||||||
title: "triggerParameterHints".into(),
|
title: "triggerParameterHints".into(),
|
||||||
command: "editor.action.triggerParameterHints".into(),
|
command: "rust-analyzer.triggerParameterHints".into(),
|
||||||
arguments: None,
|
arguments: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 {
|
export function matchingBrace(ctx: CtxInit): Cmd {
|
||||||
return async () => {
|
return async () => {
|
||||||
const editor = ctx.activeRustEditor;
|
const editor = ctx.activeRustEditor;
|
||||||
|
@ -186,5 +186,6 @@ function createCommands(): Record<string, CommandFactory> {
|
|||||||
resolveCodeAction: { enabled: commands.resolveCodeAction },
|
resolveCodeAction: { enabled: commands.resolveCodeAction },
|
||||||
runSingle: { enabled: commands.runSingle },
|
runSingle: { enabled: commands.runSingle },
|
||||||
showReferences: { enabled: commands.showReferences },
|
showReferences: { enabled: commands.showReferences },
|
||||||
|
triggerParameterHints: { enabled: commands.triggerParameterHints },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user