mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Auto merge of #14618 - westernwontons:feature/automatic-parameter-hints-toggle, r=Veykril
fix: `editor.parameterHints.enabled` not always being respected #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.
This commit is contained in:
commit
5b6655028a
1 changed files with 7 additions and 1 deletions
|
@ -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 parameterHintsEnabled = vscode.workspace
|
||||
.getConfiguration("editor")
|
||||
.get<boolean>("parameterHints.enabled");
|
||||
|
||||
if (parameterHintsEnabled) {
|
||||
await vscode.commands.executeCommand("editor.action.triggerParameterHints");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue