Automatic parameter hints trigger can be toggled on/off

This commit is contained in:
Nagy Botond 2023-04-20 19:41:15 +03:00
parent 2400b36a2e
commit 770734fdbb
2 changed files with 12 additions and 1 deletions

View file

@ -89,7 +89,13 @@ export function shuffleCrateGraph(ctx: CtxInit): Cmd {
export function triggerParameterHints(_: CtxInit): Cmd {
return async () => {
await vscode.commands.executeCommand("editor.action.triggerParameterHints");
const autoTriggerParameterHints = vscode.workspace
.getConfiguration("rust-analyzer")
.get<boolean>("autoTriggerParameterHints");
if (autoTriggerParameterHints) {
await vscode.commands.executeCommand("editor.action.triggerParameterHints");
}
};
}