about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorNagy Botond <75550932+westernwontons@users.noreply.github.com>2023-04-20 19:41:15 +0300
committerNagy Botond <75550932+westernwontons@users.noreply.github.com>2023-04-20 19:41:15 +0300
commit770734fdbb066f89fa951273a4ac03003ce0ff59 (patch)
tree6c47437eeaa231fcf9156bcc8e84ef9a5d854dc8 /editors/code/src
parent2400b36a2ed40f68a26473f69ac208ba10d98af9 (diff)
downloadrust-770734fdbb066f89fa951273a4ac03003ce0ff59.tar.gz
rust-770734fdbb066f89fa951273a4ac03003ce0ff59.zip
Automatic parameter hints trigger can be toggled on/off
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/commands.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts
index 5209fecc069..c1da65d8915 100644
--- a/editors/code/src/commands.ts
+++ b/editors/code/src/commands.ts
@@ -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");
+        }
     };
 }