Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 34c3e0b

Browse files
committed
Auto merge of rust-lang#12037 - lnicola:inlay-hint-config, r=lnicola
fix: Remove `rust-analyzer.inlayHints.enable` and set language scope Closes rust-lang#12036 CC rust-lang/rust-analyzer#12027 (comment) The key was left there by mistake in rust-lang#12006. Setting the configuration scope only works if you already have it created, which is fine, but unfortunately not quite discoverable.
2 parents 5582402 + ad751e0 commit 34c3e0b

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

editors/code/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,6 @@
293293
"default": null,
294294
"markdownDescription": "Environment variables passed to the runnable launched using `Test` or `Debug` lens or `rust-analyzer.run` command."
295295
},
296-
"rust-analyzer.inlayHints.enable": {
297-
"type": "boolean",
298-
"default": true,
299-
"description": "Whether to show inlay hints."
300-
},
301296
"rust-analyzer.server.path": {
302297
"type": [
303298
"null",

editors/code/src/commands.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,9 @@ export function serverVersion(ctx: Ctx): Cmd {
300300

301301
export function toggleInlayHints(_ctx: Ctx): Cmd {
302302
return async () => {
303-
const scope = vscode.ConfigurationTarget.Global;
304-
const config = vscode.workspace.getConfiguration("editor.inlayHints");
303+
const config = vscode.workspace.getConfiguration("editor.inlayHints", { languageId: "rust" });
305304
const value = !config.get("enabled");
306-
await config.update('enabled', value, scope);
305+
await config.update('enabled', value, vscode.ConfigurationTarget.Global);
307306
};
308307
}
309308

0 commit comments

Comments
 (0)