rust-analyzer
rust-analyzer copied to clipboard
Semantic Token Type "operator.logicalNot" Please!
IMHO, two easy to oversee characters need strong highlighting, as they completely alter flow of control: ? and !.
In VScode for the former I happily have
"editor.semanticTokenColorCustomizations": {
"rules": {
"operator.controlFlow:rust": {
"bold": true,
"foreground": "#ff8800",
}
}
},
For the latter there is no modifier, operator alone being far too vague. So instead I tried a still too vague (&& and || should not be made more visible!) old style
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "keyword.operator.logical.rust",
"settings": {
"fontStyle": "bold",
"foreground": "#ff8800"
}
}
]
},
Alas this gets recognised but ignored. Though more vague (operator vs. operator.logical) in this case, semantic seems to take precedence. So please add a modifier logicalNot to !, so that I can add it to semanticTokenColorCustomizations!