VScode转Source Insight 字体 语法 配色
效果图:
使用要点
使用前将[Visual Studio Light]
替换成自己的主题名
复制到vscode的setting.josn
文件的最外层{}
中
不要漏掉上一行的,
"workbench.colorCustomizations": {
"[Visual Studio Light]": {
"editor.background": "#90EE90",// 90EE90 8ae496 背景色
"sideBar.background": "#cbd6e5",//侧边色
"activityBar.background": "#4682B4",//活动栏颜色
},
},
"editor.tokenColorCustomizations": {
"comments": "#808080", // 注释
"keywords": "#FF00FF", // 关键字
"functions": "#000080", // 函数名
"variables": "#800080", // 变量名
"numbers": "#ff0000", // 数字
"types": "#008000", // 类型
"strings": "#000000", // 字符串
"[Visual Studio Light]": {
"textMateRules": [
{
"scope": [
"storage.type.class",//注释
],
"settings": {
"foreground": "#2F4F4F",
"fontStyle": ""
}
},
{
"scope": [
"keyword.other",//其他关键字 typedef
],
"settings": {
"foreground": "#ff00ff",
"fontStyle": ""
}
},
{
"scope": [
"keyword.control.directive", // 与宏相关的关键字
"punctuation.definition.directive",// 与宏相关的关键字符号 "#"
],
"settings": {
"foreground": "#ff00ff",
"fontStyle": "bold"
}
},
{
"scope": [
"punctuation.separator.dot-access",//语法符号,视作关键字 符号 "."
"punctuation.separator.pointer-access",//语法符号,视作关键字 符号 "->"
"keyword.operator",//语法符号,视作关键字 运算符
],
"settings": {
"foreground": "#ff00ff",
"fontStyle": ""
}
},
{
"scope": [
"entity.name.function", // 函数名
"keyword.operator.sizeof", // 库函数
],
"settings": {
"foreground": "#000080",
"fontStyle": "bold"
}
},
{
"scope": [
"variable.parameter", // 形参,视作函数的一部分
],
"settings": {
"foreground": "#000080",
"fontStyle": ""
}
},
{
"scope": [
"variable.other.global", //全局变量
],
"settings": {
"foreground": "#800080",
"fontStyle": "bold"
}
},
{
"scope": [
"variable.other.local", // 局部变量
"variable.other.property", // 结构体的字段
"punctuation",//一般的标点符号
],
"settings": {
"foreground": "#800080",
"fontStyle": ""
}
},
{
"scope": [
"entity.name.function.preprocessor", // 宏定义
],
"settings": {
"foreground": "#ff0000",
"fontStyle": "bold"
}
},
{
"scope": [
"constant.numeric", // 数值
"variable.other.enummember"//枚举值
],
"settings": {
"foreground": "#ff0000",
"fontStyle": "italic"
}
},
{
"scope": [
"storage.type.built-in.primitive.c", //自带的类型
"storage.type", // struct关键字
"storage.modifier", // const, static
],
"settings": {
"foreground": "#008000",
"fontStyle": ""
}
},
{
"scope": [
"string"
],
"settings": {
"foreground": "#000000",
"fontStyle": "",
}
},
{
"scope": [
"string.quoted.double.include",
"string.quoted.other.lt-gt.include", //头文件
"constant",
],
"settings": {
"foreground": "#0000FF",
"fontStyle": ""
}
},
],
},
},