Gruntfuggly / todo-tree

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

Not finding TODOs in certain files #760

Closed sazzer closed 1 year ago

sazzer commented 1 year ago

I've been using this extension for ages and it generally works really well.

However, I've just started using the Org Mode plugin as well, so have put together a todo.org file with my main todo list for this project.

So I've got a todo.org file containing a few TODO entries:

#+TITLE: Plan

* TODO Set up repository
* TODO Set up Go service
.....

And, for some reason, todo-tree won't show them. It works fine for other files, and it works fine for this file if I rename it to e.g. todo.md, but not when it's called .org.

Is this some configuration that I need to change? Or some strange interaction between the two plugins?

Cheers

jwverzijden commented 1 year ago

*<space><tag> is not included in the default regex to match for the tags, you can easily add it by altering the regex in the user settings, adding |\\* to the first matching group makes it highlight any line that matches * <tag> something

    "todo-tree.regex.regex": "(//|#|<!--|;|/\\*|\\*|^|^\\s*(-|\\d+.))\\s*($TAGS)",
sazzer commented 1 year ago

Aha. Got it.

I was about to point out that this doesn't explain why the exact same content works in a .md file and not a .org file. But I've just tried it out to get screenshots as proof, and it turns out that VSCode "helpfully" reformats the .md version to use - characters instead of * characters for bullet points... And as soon as it does that, this plugin picks them up.