Skip to content

Instantly share code, notes, and snippets.

@bzm3r
Last active September 1, 2023 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bzm3r/6a55d023cf12357407d4f40b6988bc1f to your computer and use it in GitHub Desktop.
Save bzm3r/6a55d023cf12357407d4f40b6988bc1f to your computer and use it in GitHub Desktop.
A semantic highlighting scheme for Rust, when using VS Code.
// Please feel free to change around the colours to best suit you. This can be done using the color
// color picker that is built into VS Code's JSON viewer
"rust-analyzer.semanticHighlighting.punctuation.specialization.enable": true,
"editor.semanticHighlighting.enabled": true,
"editor.semanticTokenColorCustomizations": {
"[Darcula Solid]": {
"enabled": true,
"rules": {
"macro": "#5dcfb0",
"namespace": {
"foreground": "#f2f2f2"
},
"parameter": {
"foreground": "#f2f2f2"
},
"function": {
"foreground": "#fe00b2"
},
"variable": {
"foreground": "#f2f2f2"
},
"property": {
"foreground": "#cbadf7"
},
"method": {
"foreground": "#bced80"
},
"*.static": {
"bold": true
},
"*.consuming": {
"underline": true
},
"*.mutable": {
"italic": true
},
"enumMember": {
"foreground": "#cbadf7",
"italic": true
},
"enum": {
"foreground": "#91beeb",
"bold": true
},
"struct": {
"foreground": "#91beeb",
"bold": true
},
"builtinType": {
"foreground": "#91beeb",
"bold": true
},
"typeAlias": {
"foreground": "#91beeb",
"bold": true
},
"deriveHelper": {
"foreground": "#fcbb9d"
},
"decorator": {
"foreground": "#fcbb9d"
},
"keyword": {
"foreground": "#fca051"
},
"interface": {
"foreground": "#bb52f7"
},
"typeParameter": {
"foreground": "#e34d69",
"bold": true
},
"selfTypeKeyword": {
"foreground": "#d6c252",
"bold": true
},
"constParameter": {
"foreground": "#f2f2f2",
"bold": true,
"underline": true,
},
"comment": {
"foreground": "#ffee008f"
}
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment