mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-23 03:44:23 +00:00
Pass the language id when toggling inlay hints
This commit is contained in:
parent
4de7793425
commit
ad751e08ec
1 changed files with 2 additions and 3 deletions
|
@ -300,10 +300,9 @@ export function serverVersion(ctx: Ctx): Cmd {
|
|||
|
||||
export function toggleInlayHints(_ctx: Ctx): Cmd {
|
||||
return async () => {
|
||||
const scope = vscode.ConfigurationTarget.Global;
|
||||
const config = vscode.workspace.getConfiguration("editor.inlayHints");
|
||||
const config = vscode.workspace.getConfiguration("editor.inlayHints", { languageId: "rust" });
|
||||
const value = !config.get("enabled");
|
||||
await config.update('enabled', value, scope);
|
||||
await config.update('enabled', value, vscode.ConfigurationTarget.Global);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue