mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
using VSCode's native parameterHints.enabled setting
This commit is contained in:
parent
770734fdbb
commit
36281e0745
2 changed files with 4 additions and 9 deletions
|
@ -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": {}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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<boolean>("autoTriggerParameterHints");
|
||||
const parameterHintsEnabled = vscode.workspace
|
||||
.getConfiguration("editor")
|
||||
.get<boolean>("parameterHints.enabled");
|
||||
|
||||
if (autoTriggerParameterHints) {
|
||||
if (parameterHintsEnabled) {
|
||||
await vscode.commands.executeCommand("editor.action.triggerParameterHints");
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue