-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
4601: Introduce `toggle inlay hints` vscode command r=matklad a=Veetaha Users now can assign a shortcut for this command via the general vscode keybindings ui or `keybindings.json` file <details> <summary>Demo</summary> ![demo](https://user-images.githubusercontent.com/36276403/82768941-b4fd1c80-9e3a-11ea-9d5b-a40fa1e4dbc6.gif) </details> <details> <summary>Howto assign a shortcut</summary> ![demo2](https://user-images.githubusercontent.com/36276403/82769350-c8a98280-9e3c-11ea-8a95-1266a539826d.gif) </details> Closes: #4599 Co-authored-by: veetaha <[email protected]>
- Loading branch information
Showing
6 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as vscode from 'vscode'; | ||
import { Ctx, Cmd } from '../ctx'; | ||
|
||
export function toggleInlayHints(ctx: Ctx): Cmd { | ||
return async () => { | ||
await vscode | ||
.workspace | ||
.getConfiguration(`${ctx.config.rootSection}.inlayHints`) | ||
.update('enable', !ctx.config.inlayHints.enable, vscode.ConfigurationTarget.Workspace); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters