其他分享
首页 > 其他分享> > vscode插件-ToDo Tree (待办事项插件)

vscode插件-ToDo Tree (待办事项插件)

作者:互联网

简介

Todo Tree是vscode中一款可以在侧边栏记录TODO注释(也可以配置其他的注释)并且可以高亮注释行的很优秀的插件。有的时候我们写程序的时候,难免会遇到一些情况需要标记或者搁置,在写代码的时候会用一些特殊的注释来表示不同的内容,使我们可以快速的定位我们注释的位置。

配置步骤

  1. 在vscode中的左侧边栏,点击“扩展”,然后搜索“todo tree”

  2. 在vscode中配置todo标记时的颜色

"todo-tree.tree.showScanModeButton": false,
  "todo-tree.filtering.excludeGlobs": ["**/node_modules", "*.xml", "*.XML"],
  "todo-tree.filtering.ignoreGitSubmodules": true,
  "todohighlight.keywords": [],
  "todo-tree.tree.showCountsInTree": true,
  "todohighlight.keywordsPattern": "TODO:|FIXME:|NOTE:|\\(([^)]+)\\)",
  "todohighlight.defaultStyle": {},
  "todohighlight.isEnable": false,
  "todo-tree.highlights.customHighlight": {
    "BUG": {
      "icon": "bug",
      "foreground": "#F56C6C",
      "type": "text"
    },
    "FIXME": {
      "icon": "flame",
      "foreground": "#FF9800",
      "type": "tag-and-comment"
    },
    "TODO": {
      "foreground": "#FFEB38",
      "type": "line"
    },
    "NOTE": {
      "icon": "note",
      "foreground": "#67C23A",
      "type": "whole-line"
    },
    "INFO": {
      "icon": "info",
      "foreground": "#909399",
      "type": "text-and-comment"
    },
    "TAG": {
      "icon": "tag",
      "foreground": "#409EFF",
      "type": "line"
    },
    "HACK": {
      "icon": "versions",
      "foreground": "#E040FB",
      "type": "line"
    },
    "XXX": {
      "icon": "unverified",
      "foreground": "#E91E63",
      "type": "line"
    }
  },
  "todo-tree.general.tags": [
    "BUG",
    "HACK",
    "FIXME",
    "TODO",
    "INFO",
    "NOTE",
    "TAG",
    "XXX"
  ],
  "todo-tree.general.statusBar": "total"
  1. 使用在“todo-tree.highlights.customHighlight”配置的属性对需要使用标记的地方进行注释即可

如果想要修改标记的icon,则可以到:https://microsoft.github.io/vscode-codicons/dist/codicon.html
如果想要修改标记的颜色,则可以到:https://www.5tu.cn/colors/yansezhongwenming.html

参考博文

https://www.cnblogs.com/donpangpang/p/14612568.html
https://blog.csdn.net/m0_46149348/article/details/123243222

标签:foreground,插件,vscode,type,tree,待办,line,todo,icon
来源: https://www.cnblogs.com/it774274680/p/16542312.html