vscode字体设置方案(仿照Xcode)
"textMateRules": [
{ //结构体名称
"scope": [
"entity.name.type.go",
],
"settings": {
"foreground": "#dddddd",
"fontStyle": ""
}
},
{
//keyword:type,struct
"scope": [
"keyword.type.go",
"keyword.struct.go"
],
"settings": {
"foreground": "#7bcae7",
//"fontStyle": "bold"
}
},
{
//keyword: func
"scope": [
"keyword.function.go",
],
"settings": {
"foreground": "#ab399e",
"fontStyle": "bold"
}
},
{
//keyword: if,else,for,switch,range...
"scope": [
"keyword.control.go"
],
"settings": {
"foreground": "#ac69a4",
"fontStyle": "bold"
}
},
{
//keyword: var
"scope": [
"keyword.var.go",
"keyword.const.go"
],
"settings": {
"foreground": "#f92672",
"fontStyle": "bold"
}
},
{
//keyword: =,>,<...
"scope": [
"keyword.operator.assignment.go",
"keyword.operator.channel.go"
],
"settings": {
"foreground": "#f92672",
"fontStyle": "bold"
}
},
{
//变量定义,赋值时
"scope": [
"variable.other.assignment.go",
"variable.other.declaration.go"
],
"settings": {
"foreground": "#dddddd",
//"fontStyle": "underline"
}
},
{
"scope": [
"string.quoted.double.go"
],
"settings": {
"foreground": "#ef8876",
"fontStyle": "italic"
}
},
{
"scope": [
// "variable.parameter",
"variable.other.readwrite",
"meta.arrow.js"
],
"settings": {
//"foreground": "#06172b"
"foreground": "#69aedc"
}
},
{
//其他代码
"scope": [
/*
"variable.other.assignment.go",
"variable.other.declaration.go",
*/
"source.go",
],
"settings": {
"foreground": "#a2a9b1",
}
},
{
"scope": [
"meta.function-call",
"entity.name.function.go"
],
"settings": {
//"foreground": "#2871bb"
"foreground": "#48a2df",
"fontStyle": "bold"
}
}
]
使用SF mono字体(Xcode上的使用的)需要自行下载改字体,并安装到macos字集中(windows未尝试)
然后设置资源管理器字体大小:
https://blog.51cto.com/u_15349906/3714833
但是修改文件后,mac下直接提示文件损坏。

浙公网安备 33010602011771号