Video - Rust Tip - Customize Mutable Colors in VSCode
In the settings.json
add the following:
"editor.semanticTokenColorCustomizations": {
"enabled": true,
"rules": {
"*.mutable": {
"underline": false,
"foreground": "#d9bbfc"
}
}
},
Note: If you already have one or more
"editor.semanticTokenColorCustomizations"
rules already, just add the rule above.
Video - Rust Tip - Rust Analyzer Toggle Inlays
-
Install Settings Cycler VSCode extension.
-
In the user
keybindings.json
add the following key mapping to the array.
{
"key": "cmd+y", // 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
}
]
}
}