Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/src/commands.ts')
| -rw-r--r-- | editors/code/src/commands.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index 4b2ac44801..18f5b3aa10 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts @@ -298,12 +298,12 @@ export function serverVersion(ctx: Ctx): Cmd { }; } -export function toggleInlayHints(ctx: Ctx): Cmd { +export function toggleInlayHints(_ctx: Ctx): Cmd { return async () => { - await vscode - .workspace - .getConfiguration(`${ctx.config.rootSection}.inlayHints`) - .update('enable', !ctx.config.inlayHints.enable, vscode.ConfigurationTarget.Global); + const scope = vscode.ConfigurationTarget.Global; + const config = vscode.workspace.getConfiguration("editor.inlayHints"); + const value = !config.get("enabled"); + await config.update('enabled', value, scope); }; } |