vs code 自定义代码字体颜色,局部变量、全局变量、函数、宏、属性
打开设置点击右上角
在这写上这段代码
"editor.semanticTokenColorCustomizations": {
"enabled": true, // enable for all themes
"rules": {
"*.static": {
"foreground": "#ff0000",
"fontStyle": "bold"
},
"property": { //属性
"foreground": "#8ebd79",
"fontStyle": "bold"
},
"macro": { //宏
"foreground": "#ec106c",
"fontStyle": "bold"
},
"function": { //函数
"foreground": "#5491e0",
"fontStyle": "bold"
},
"variable.global": { //全局变量
"foreground": "#beda22",
"fontStyle": "bold"
},
"variable.local": { //局部变量
"foreground": "#2271da",
"fontStyle": "bold"
},
}
}