Last active
November 10, 2022 19:19
-
-
Save baniol/9017bc8e721730185a68c964b73a302d to your computer and use it in GitHub Desktop.
Toggle inlay hints vsc
This file contains hidden or 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
{ | |
"key": "alt+f", // key to press to activate command | |
"command": "settings.cycle", // `settings.cycle` is the command that's actually being run, from the extension `hoovercj.vscode-settings-cycler` | |
"when": "editorTextFocus && editorLangId == 'rust'", // this keybinding is only active when (editor is in focus) and (the language is `rust`) | |
"args": { // these are the arguments passed to `settings.cycle` | |
"id": "rust-toggle-inlay-hints", // must be unique | |
"overrideWorkspaceSettings": true, | |
"values": [ // Note: use the same settings in each values object | |
{ | |
"rust-analyzer.inlayHints.enable": false // sets the inlay hints off | |
}, | |
{ | |
"rust-analyzer.inlayHints.enable": true // sets the inlay hints on | |
} | |
] | |
} | |
}, |
This file contains hidden or 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
// Place your key bindings in this file to override the defaults | |
[ | |
{ | |
"key": "alt+f", | |
"command": "toggle", | |
"when": "editorTextFocus", | |
"args": { | |
"id": "toggle_inlay_hints", | |
"value": [ | |
{ | |
"editor.inlayHints.enabled": "on" | |
}, | |
{ | |
"editor.inlayHints.enabled": "off" | |
} | |
] | |
} | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment