当你想在 VSCode 中看到更多彩虹效果时
我决定再给 VSCode 一个机会,然后决定,既然要从头开始搭建一个编辑器,那就让它变得有趣点吧!我四处搜索,找到了以下扩展:
它们各自的默认颜色……还不错。但我需要✨彩虹✨。所以我的设置如下:
"bracket-pair-colorizer-2.colors": [
"DeepSkyBlue",
"DodgerBlue",
"MediumSlateBlue",
"BlueViolet",
"MediumVioletRed",
"DeepPink",
"Red",
"DarkOrange",
"Gold",
"GreenYellow",
"LimeGreen",
"LightSeaGreen",
"DarkTurquoise"
],
"rainbowTags.colors": [
"BlueViolet",
"MediumVioletRed",
"DeepPink",
"Red",
"DarkOrange",
"Gold",
"GreenYellow",
"LimeGreen",
"LightSeaGreen",
"DarkTurquoise",
"DeepSkyBlue",
"DodgerBlue",
"MediumSlateBlue"
],
"indentRainbow.colors": [
"rgba(0,191,255,0.07)",
"rgba(30,144,255,0.07)",
"rgba(123,104,238,0.07)",
"rgba(138,43,226,0.07)",
"rgba(199,21,133,0.07)",
"rgba(255,20,147,0.07)",
"rgba(255,0,0,0.07)",
"rgba(255,140,0,0.07)",
"rgba(255,215,0,0.07)",
"rgba(173,255,47,0.07)",
"rgba(50,205,50,0.07)",
"rgba(32,178,170,0.07)",
"rgba(0,206,209,0.07)"
],
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "rainbow1",
"settings": {
"foreground": "#0082C8"
}
},
{
"scope": "keyword.rainbow2",
"settings": {
"foreground": "#39afa9",
}
},
{
"scope": "entity.name.function.rainbow3",
"settings": {
"foreground": "#21c761",
}
},
{
"scope": "comment.rainbow4",
"settings": {
"foreground": "#acf35c",
}
},
{
"scope": "string.rainbow5",
"settings": {
"foreground": "#f7ec56"
}
},
{
"scope": "variable.parameter.rainbow6",
"settings": {
"foreground": "#f0ac46",
}
},
{
"scope": "constant.numeric.rainbow7",
"settings": {
"foreground": "#f05e32",
}
},
{
"scope": "entity.name.type.rainbow8",
"settings": {
"foreground": "#ce1919",
}
},
{
"scope": "markup.bold.rainbow9",
"settings": {
"foreground": "#f531cb"
}
},
{
"scope": "invalid.rainbow10",
"settings": {
"foreground": "#8d31f7"
}
}
]
}
括号对着色器和缩进彩虹的最终结果是这样的(彩虹标签看起来非常相似): 彩虹 CSV 看起来是这样的: 我尝试过彩虹字符串,效果非常棒!但它有时会把彩虹化的对象扩展到字符串之外,这样我就无法使用语法高亮了。总的来说,我不推荐这个工具,尽管它确实很棒。