[个人配置] VSCode Better Comments 扩展配置、高亮注释插件
在VSCode IDE中,我的代码注释一般都有高亮颜色,那要怎么安装这个插件呢?请看步骤
PS:注线插件是 highlight line,界面主题是 One Dark Pro Flat
- 打开你的Vscode!
- 点击扩展
- 搜索better comments,点击安装
- 打开你的setting.json,找不到怎么办,请跟着这个步骤来
- 添加如下代码,记得确保代码添加在
{ }
里,包含在内不要加到外面去了,并保证前面有半角逗号,
- 重启VSCode
正确的结构应该是
{
"better-comments.tags": [
...
...
...
]
}
# 如果有其他插件
{
"better-comments.tags": [
...
...
...
],
"bbb":[
...
],
"aaa":{}
}
代码
"better-comments.tags": [
{
"tag": "!!",
"color": "#FF2D00",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "?",
"color": "#3498DB",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "、、",
"color": "#474747",
"strikethrough": true,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "!",
"color": "#FF8C00",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "info",
"color": "#CCFFFF",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "tip",
"color": "#CCFFFF",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "important",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "example",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "坑",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "可以删除",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "future",
"color": "#CCFFFF",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "未完成",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "@",
"color": "#CCFFFF",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "test",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "warn",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "step",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "^",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "fixme",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "mistake",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "fail",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "***",
"color": "#98C379",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
}
]