[个人配置] VSCode Better Comments 扩展配置、高亮注释插件

在VSCode IDE中,我的代码注释一般都有高亮颜色,那要怎么安装这个插件呢?请看步骤

PS:注线插件是 highlight line,界面主题是 One Dark Pro Flat


  1. 打开你的Vscode!
  2. 点击扩展
  3. 搜索better comments,点击安装
  4. 打开你的setting.json,找不到怎么办,请跟着这个步骤来
  5. 添加如下代码,记得确保代码添加在 { } 里,包含在内不要加到外面去了,并保证前面有半角逗号 ,
  6. 重启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
    }
  ]

 

posted @ 2022-03-18 01:34  小能日记  阅读(103)  评论(0编辑  收藏  举报