Skip to content

Commit 5b66550

Browse files
committed
Auto merge of rust-lang#14618 - westernwontons:feature/automatic-parameter-hints-toggle, r=Veykril
fix: `editor.parameterHints.enabled` not always being respected rust-lang#13472 When accepting a suggestion, the parameter hints would always trigger automatically. This PR provides the ability for users to toggle this functionality off by specifying the new "rust-analyzer.autoTriggerParameterHints" option in `settings.json`. Possible options are `true` and `false`. It's `true` by default.
2 parents 2400b36 + 36281e0 commit 5b66550

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

editors/code/src/commands.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ export function shuffleCrateGraph(ctx: CtxInit): Cmd {
8989

9090
export function triggerParameterHints(_: CtxInit): Cmd {
9191
return async () => {
92-
await vscode.commands.executeCommand("editor.action.triggerParameterHints");
92+
const parameterHintsEnabled = vscode.workspace
93+
.getConfiguration("editor")
94+
.get<boolean>("parameterHints.enabled");
95+
96+
if (parameterHintsEnabled) {
97+
await vscode.commands.executeCommand("editor.action.triggerParameterHints");
98+
}
9399
};
94100
}
95101

0 commit comments

Comments
 (0)