TodoParser extension for vscode. Parse TODOs in your project.
Clone or download

README.md

VSCode TODO Parser Extension

marketplace marketplace-installs marketplace-rating

GitHub issues Travis GitHub

GUYS, I'M SORRY FOR THE SLOW RESPONSE AND MAINTAINANCE

Sometimes it is the job that you want prevents you from working on the project that you nurture :(

Parse TODOs in your working files.

Demo

Install

  • Visit the Market here.
  • Or open VSCode, press F1 then type this command ext install vscode-todo-parser. Press Enter to install.

Features

Parse TODOs in the current document:

  • Open a file.

  • The TODO Counter on Status Bar shows the number of TODO in the current document.

    status bar

  • Click on the Counter to parse TODOs in the current document..

  • Alternatively, in the F1 command menu, select Parse TODOs (current document).

Parse TODOs in the project:

  • Press F1 > Parse TODOs (all files).

Note that for large projects, the result will be displayed gradually. You can see the progress at the bottom (the bolt icon ⚡️). Clicking on it will cancel the task.

progress

We support both single-line and multi-line comments. For example:

// TODO: this todo is valid

/* TODO: this is also ok */

/* It's a nice day today
 *
 * Todo: multi-line TODOs are
 * supported too!
 */

Settings

Include the below snippet in your User Settings (File > Preferences > User Settings).

"TodoParser": {
  "exclude": ["cpp", "c"],
  "include": ["js"],
  "folderExclude": ["node_modules", ".vscode"],
  "only": ["sub-folder/sub-sub-folder"],
  "showInProblems": false,
  "markers": ["NOTE:", "REMINDER:", ["FIXME", "Warning"]],
  "autoDefaultMarkers": true
}

exclude

Set which file extension you want to exclude. For example, "exclude": ["cpp"] will exclude all *.cpp files from Parse TODOs (all files).

include

Set which file extension you want to include. If both include and exclude entry exist, include is prefered (ignore value of exclude).

folderExclude

Set which folder you want to exclude. Allowed values are folder names only (not directory path).

only

Set which folder you want to focus on.

If both only and folderExclude exist, only is prefered. In that case, folderExclude entry will work inside these only folders.

Each item is a path under the root folder. For example:

  • Your project structure is:
root
|-src
|  |--common
|  +--models
|     |--item.ts
|     +--test
+-static
  • And you only want to focus on the root/src/models folder. But you'd like to ignore the root/src/models/test folder. Then your setting should be:
"TodoParser": {
  "folderExclude": ["test"],
  "only": ["src/models"]
}

showInProblems

If true, show the results in the Problems panel instead of the Output panel.

markers

Contains the words that signal the start of TODOs. It can contain either strings, or tuples of [marker string, priority] pairs.

Priority can be either of these strings (sorted by severity, lowest to highest):

  • "Hint"
  • "Information"
  • "Warning"
  • "Error"

Example usage:

  • "markers": ["NOTE:"] will enable matching NOTE: this is a new type of TODO.
  • "markers": [ ["FIXME:", "Warning"] ] will enable matching FIXME: This is important and will mark it as a warning in the Problems panel.

autoDefaultMarkers

If true, automatically add the default "TODO" marker. Default is true.

Supported languages

Java, Javascript, C#, C, C++, F#, Python, Ruby, Coffee Script, R, Haskell, Lua, Go, Perl, Markdown, Css, Scss, Less, Latex, Typescript, Elixir, Shell Script, Twig, Visual Basic, Matlab.

Note that multi-line comment style is only supported in languages that have the syntax in the example.

Contribution

This is a small project by a passionate student so any contribution is welcome and loved 👍