Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 770734f

Browse files
Automatic parameter hints trigger can be toggled on/off
1 parent 2400b36 commit 770734f

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

editors/code/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,6 +1455,11 @@
14551455
"Search in current workspace and dependencies."
14561456
]
14571457
},
1458+
"rust-analyzer.autoTriggerParameterHints": {
1459+
"type": "boolean",
1460+
"default": true,
1461+
"markdownDescription": "Enable or disable automatic triggering of parameter hints when accepting suggestions."
1462+
},
14581463
"$generated-end": {}
14591464
}
14601465
},

editors/code/src/commands.ts

Lines changed: 7 additions & 1 deletion
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 autoTriggerParameterHints = vscode.workspace
93+
.getConfiguration("rust-analyzer")
94+
.get<boolean>("autoTriggerParameterHints");
95+
96+
if (autoTriggerParameterHints) {
97+
await vscode.commands.executeCommand("editor.action.triggerParameterHints");
98+
}
9399
};
94100
}
95101

0 commit comments

Comments
 (0)