From 36281e0745b7740fcb880e48cdb417ff7944414b Mon Sep 17 00:00:00 2001 From: Nagy Botond <75550932+westernwontons@users.noreply.github.com> Date: Thu, 20 Apr 2023 22:13:33 +0300 Subject: [PATCH] using VSCode's native parameterHints.enabled setting --- editors/code/package.json | 5 ----- editors/code/src/commands.ts | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/editors/code/package.json b/editors/code/package.json index 4b6406ee7dd..f6ad2f7908f 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -1455,11 +1455,6 @@ "Search in current workspace and dependencies." ] }, - "rust-analyzer.autoTriggerParameterHints": { - "type": "boolean", - "default": true, - "markdownDescription": "Enable or disable automatic triggering of parameter hints when accepting suggestions." - }, "$generated-end": {} } }, diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index c1da65d8915..0d91548b9b3 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts @@ -89,11 +89,11 @@ export function shuffleCrateGraph(ctx: CtxInit): Cmd { export function triggerParameterHints(_: CtxInit): Cmd { return async () => { - const autoTriggerParameterHints = vscode.workspace - .getConfiguration("rust-analyzer") - .get("autoTriggerParameterHints"); + const parameterHintsEnabled = vscode.workspace + .getConfiguration("editor") + .get("parameterHints.enabled"); - if (autoTriggerParameterHints) { + if (parameterHintsEnabled) { await vscode.commands.executeCommand("editor.action.triggerParameterHints"); } };