I'm trying to change the syntax highlighting for punctuation in rust within vscode, but it doesnt seem to work for semicolons, colons, angle-brackets and brackets.
I noticed that even setting "*": "#660066"
doesnt highlight those punctuations.
Could there be a problem with rust-analyzer then?
My current settings.json
:
{
"rust-analyzer.linkedProjects": [
"./Cargo.toml"
],
"editor.semanticTokenColorCustomizations": {
"[Dracula]": {
"enabled": true,
"rules": {
// "macro": "#fa7f38",
// "*": "#660066", // no effect on ';',':','<>','()','[]'
"attribute": "#fa7f38",
"attribute.bracket": "#fa7f38",
// "builtinAttribute": "#fa7f38",
"attributeBracket": "#fa7f38",
"generic": "#fa7f38",- // no effect on ';',':','<>','()','[]'
"bracket": "#fa7f38",
// "unresolvedReference": "#fa7f38",
"enumMember": "#cc9900", // works!
"namespace": "#99ccff", // works!
// Punctutation
"parenthesis": "#660066", // no effect on ';',':','<>','()','[]'
"brace": "#660066", // no effect on ';',':','<>','()','[]'
"colon": "#66ff33" // no effect on ';',':','<>','()','[]'
}
}
}
}
Same goes for brackets []
in attributes like #[cfg(test)]
.
What I have tried so far:
- Reopening+Reloading vscode
- reinstalling rust-analyzer
- reopening opened tabs in vscode
Does anyone know how to make it work?
References: rust-analyzer syntax highlighting, settings.json from reddit user