我正在尝试更改 vscode 中 rust 中标点符号的语法突出显示,但它似乎不适用于分号、冒号、尖括号和方括号。
我注意到即使设置
"*": "#660066"
也不会突出显示这些标点符号。
会不会是rust-analyzer有问题?
我目前的
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 ';',':','<>','()','[]'
}
}
}
}
同样适用于括号
[]
在属性如#[cfg(test)]
.
到目前为止我尝试了什么:
有人知道如何让它工作吗?