字体样式
=>
和===
有特殊效果很多字体都支持使用连字,Cascadia Code 、Jetbrains Mono 、Fira Code 等
安装Cascadia Code
下载完成后解压安装
选中右键安装,static文件里也一样安装
VS Code 中配置设置字体和连字设置
Cascadia Code, Consolas, 'Courier New', monospace
连字设置
效果
JSON配置项-配置项
"editor.fontLigatures": true, //连字
"editor.fontFamily": "Cascadia Code, Consolas, 'Courier New', monospace",//字体
// 样式设置
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"name": "italic font",
"scope": [
"comment",
"keyword",
"storage",
"keyword.control.import",
"keyword.control.default",
"keyword.control.from",
"keyword.operator.new",
"keyword.control.export",
"keyword.control.flow",
"storage.type.class",
"storage.type.function",
"storage.type",
"storage.type.class",
"variable.language",
"variable.language.super",
"variable.language.this",
"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.html",
"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"
],
"settings": {
"fontStyle": "italic"
}
}
]
}