how to ignore the TODOs of node_modules ?
@lijialiang how did you solve this problem?
You can add node_modules to your .gitignore file as ripgrep respects those files by default.
You could also add node_modules to to todo-tree.excludeGlobs, e.g.
"todo-tree.excludeGlobs":["**/node_modules"]
Not working on version 0.0.162. Vscode complains about an "Unknown Configuration Setting" when I try to set "todo-tree.excludeGlobs":["**/node_modules"].
There's a "todo-tree.filtering.excludeGlobs", though. But all the todos disappear by using
"todo-tree.filtering.excludeGlobs": [
"**/node_modules/*"
]
Yes, the correct setting name is now todo-tree.filtering.excludeGlobs (there were too many settings, so I needed to organise them).
Your second setting should work correctly though. Can you enable todo-tree.general.debug and see what is shown in the Output View? You should find 'Todo Tree' in the drop down once debug is enabled.
don't you think node modules should be hidden by default?
I don't think the extension should be adding default excludes. Some users may genuinely want to see TODO items from their node modules folder.
I don't think the extension should be adding default excludes. Some users may genuinely want to see TODO items from their node modules folder.
almost every major extension doesn't read node_modules, as they are a huge blob of data that 90% of users don't need to look at.
You could make the same argument for other folders that could be ignored, but the extension doesn't know what environment you are developing in, so it seems wrong to arbitrarily start ignoring folders.
Is there a reason you don't want to add the exclude glob described above?
Another alternative is if you've configured vscode to ignore node_modules using "files.exclude" you can set todo-tree.filtering.useBuiltInExcludes to use those too.
IMO since the huge majority of users will be annoyed by seeing a hundred todos they didn't write, it makes sense to hide them by default BUT allow the small percent of users who do want them to configure the settings to see them
I have node_modules in .gitignore and it is still showing TODOs in the tree.
Any idea?
Adding it to exclude globs works well. Thank you for the extension
Is it possible the file containing the todos is already open in the editor - those will get included. Otherwise, can you open the Todo Tree output console (enable todo-tree.general.debug) and post the contents of the generated command (and the search results if it's not too large)...
Yes you are right I think, the file was probably opened in the editor.
Thank you very much 馃憤
Not working on version 0.0.162. Vscode complains about an "Unknown Configuration Setting" when I try to set
"todo-tree.excludeGlobs":["**/node_modules"].There's a
"todo-tree.filtering.excludeGlobs", though. But all the todos disappear by using"todo-tree.filtering.excludeGlobs": [ "**/node_modules/*" ]
If it doesn't work, try this.
"todo-tree.filtering.excludeGlobs": [
"**/node_modules/**"
]
Just came across this issue - VSCode smashing the CPU, found out it was Todo Tree searching node_modules. As mentioned by others, common / expected behaviour should be to exclude node_modules to handle the use case of 99% of users, thanks for the extension but yeah, seems like a simple fix to save people trying to diagnose an easily solved (and pretty annoying) issue.
(solved by the excludeGlobs solutions above ^ )
You can add
node_modulesto your .gitignore file as ripgrep respects those files by default.
You could also add node_modules to totodo-tree.excludeGlobs, e.g."todo-tree.excludeGlobs":["**/node_modules"]
Thanks! Work perfectly
I've added **/node_modules to the default exclude globs for the next release.
Most helpful comment
Not working on version 0.0.162. Vscode complains about an "Unknown Configuration Setting" when I try to set
"todo-tree.excludeGlobs":["**/node_modules"].There's a
"todo-tree.filtering.excludeGlobs", though. But all the todos disappear by using