diff options
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r-- | editors/code/src/commands/index.ts | 1 | ||||
-rw-r--r-- | editors/code/src/commands/toggle_inlay_hints.ts | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts index abb53a248..c2a232d5f 100644 --- a/editors/code/src/commands/index.ts +++ b/editors/code/src/commands/index.ts | |||
@@ -16,6 +16,7 @@ export * from './expand_macro'; | |||
16 | export * from './runnables'; | 16 | export * from './runnables'; |
17 | export * from './ssr'; | 17 | export * from './ssr'; |
18 | export * from './server_version'; | 18 | export * from './server_version'; |
19 | export * from './toggle_inlay_hints'; | ||
19 | 20 | ||
20 | export function collectGarbage(ctx: Ctx): Cmd { | 21 | export function collectGarbage(ctx: Ctx): Cmd { |
21 | return async () => ctx.client.sendRequest(ra.collectGarbage, null); | 22 | return async () => ctx.client.sendRequest(ra.collectGarbage, null); |
diff --git a/editors/code/src/commands/toggle_inlay_hints.ts b/editors/code/src/commands/toggle_inlay_hints.ts new file mode 100644 index 000000000..7606af8d0 --- /dev/null +++ b/editors/code/src/commands/toggle_inlay_hints.ts | |||
@@ -0,0 +1,11 @@ | |||
1 | import * as vscode from 'vscode'; | ||
2 | import { Ctx, Cmd } from '../ctx'; | ||
3 | |||
4 | export function toggleInlayHints(ctx: Ctx): Cmd { | ||
5 | return async () => { | ||
6 | await vscode | ||
7 | .workspace | ||
8 | .getConfiguration(`${ctx.config.rootSection}.inlayHints`) | ||
9 | .update('enable', !ctx.config.inlayHints.enable, vscode.ConfigurationTarget.Workspace); | ||
10 | }; | ||
11 | } | ||