Skip to content

Configuration Examples

Nigel Scott edited this page Oct 29, 2019 · 4 revisions

Regexs for various languages

If you are modifying the settings directly in settings.json you'll need to escape the backslashes, as shown in these examples. If you are using the setting GUI, you only need one backslash.

JavaDoc

"todo-tree.regex.regex": "(//|#|<!--|/\\*|^\\s*\\*)\\s*($TAGS)"

It will match

  • //
  • #
  • <!--
  • /*,
  • * (for JSDoc)

Also works with JS, BASH, PHP, HTML, CSS, MD, JSON, XML.

Ocaml (and other ML languages using (* comment *) style comments)

"todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|\\(\\*)\\s*($TAGS)"

PQSL

"todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|\\(\\*|--)\\s*($TAGS)"

PHP

To match standard @todo tags:

"todo-tree.regex.regex": "(//|#|<!--|;|/?\\*|^)\\s*($TAGS)",
"todo-tree.general.tags": [
    "@todo",
    "TODO",
    "FIXME"
  ]

Globs

A useful exclude globs list:

"todo-tree.filtering.excludeGlobs": [
        "**/vendor/**",
        "**/node_modules/**",
        "**/dist/**",
        "**/bower_components/**",
        "**/build/**",
        "**/.vscode/**",
        "**/.github/**",
        "**/_output/**",
        "**/*.min.*",
        "**/*.map"
    ]
Clone this wiki locally
You can’t perform that action at this time.