Skip to content

Commit ad751e0

Browse files
committed
Pass the language id when toggling inlay hints
1 parent 4de7793 commit ad751e0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

editors/code/src/commands.ts

+2-3
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)