使 VSCode 变量具有颜色 [英] Make VSCode Variables have Colour
本文介绍了使 VSCode 变量具有颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想让变量用颜色显示.
I would like to make variables displayed with colours.
这是它的样子:
这就是我想要的:
查看此处,我找不到任何可以更改此设置的设置.
Looking through here, I cannot find any settings that allow me to change this.
推荐答案
在 settings.json 中试试这个设置:
Try this setting in your settings.json:
"editor.tokenColorCustomizations": {
"variables": "#f00"
},
有一些这样的简单标记颜色自定义可用:变量、注释、关键字、函数、数字、字符串和类型.那些只允许设置颜色.
There are a few such simple token color customizations available: variables, comments, keywords, functions, numbers, strings and types. Those only allow setting the color though.
如果您使用textMateRules",您可以设置更多属性.例如:
If you use "textMateRules" you can set more properties. For example:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "comment",
"settings": {
"fontStyle": "italic",
"foreground": "#C69650"
}
}
]
},
这篇关于使 VSCode 变量具有颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文