效果:
配置代码:
{
"editor.fontFamily": "HYMiaoHunZiYouTi",
// "editor.fontFamily": "Monoid-HalfLoose-Regular",
// "editor.fontFamily": "Operator Mono",
// "editor.fontFamily": "Consolas",
"editor.lineHeight": 19,
"editor.formatOnSave": true,
"editor.fontLigatures": true,
// font size for Monoid-HalfLoose-Regular
// "editor.fontSize": 11,
"editor.fontSize": 16,
// "editor.fontSize": 14,
"editor.fontWeight": "500",
"editor.letterSpacing": 0.1,
"eslint.enable": false,
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"name": "italic font",
"scope": [
"constant",
"comment",
"keyword",
"storage",
"keyword.control",
"keyword.control.from",
"keyword.control.flow",
"keyword.operator.new",
"keyword.control.import",
"keyword.control.export",
"keyword.control.default",
"keyword.control.trycatch",
"keyword.control.conditional",
"storage.type",
"storage.type.class",
"storage.modifier.tsx",
"storage.type.function",
"storage.modifier.async",
"variable.language",
"variable.language.this",
"variable.language.super",
"meta.class",
"meta.var.expr",
"constant.language.null",
"support.type.primitive",
"entity.name.method.js",
"entity.other.attribute-name",
"punctuation.definition.comment",
"text.html.basic entity.other.attribute-name",
"tag.decorator.js entity.name.tag.js",
"tag.decorator.js punctuation.definition.tag.js",
"source.js constant.other.object.key.js string.unquoted.label.js",
"string.quoted.single.js",
"meta.block.js",
"meta.function.expression.js",
"meta.block.js",
"meta.function.expression.js",
"meta.var.expr.js",
"meta.block.js",
"meta.function.expression.js",
"source.js",
"text.html.derivative",
"string.quoted.double.html",
"meta.attribute.class.html",
"meta.tag.structure.div.start.html"
],
"settings": {
"fontStyle": "italic"
}
},
{
"scope": [
//following will be excluded from italics (VSCode has some defaults for italics)
"constant.string.css",
"invalid",
"keyword.operator",
"constant.numeric.css",
"keyword.other.unit.px.css",
"constant.numeric.decimal.js",
"constant.numeric.json"
],
"settings": {
"fontStyle": "italic"
}
}
]
}
}