Gruntfuggly / todo-tree

Use ripgrep to find TODO tags and display the results in a tree view
Other
1.41k stars 135 forks source link

Add `--` to the default todo tree regex #695

Closed dominiksalvet closed 1 year ago

dominiksalvet commented 1 year ago

The -- characters start a line comment in VHDL language. It would be great to have them in default.

Something like this:

image

Gruntfuggly commented 1 year ago

The default regex is just a starting point - it would be impossible to have it work for everybody, so thats why its configurable.

I used to try updating the default, but it always causes problems for existing users, so I don't change it anymore.

However, I'll add it to the wiki page.

dominiksalvet commented 1 year ago

Okay, got it. By the way, wouldn't it be possible to get from VSCode somehow whether a code section is in the comment or not? This way you do not have to deal with the comments regex I think... 🤔

Gruntfuggly commented 1 year ago

VSCode doesn't really provide anything for that - you would need to use a language parse for it to work reliably. The other reason for the comment part of the regex is that it uses ripgrep to search all files (outside of vscode) and the comment type obviously depends on the type of file currently being searched.