Giter Club home page Giter Club logo

Comments (17)

fredriccliver avatar fredriccliver commented on September 28, 2024 22

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/**"
  ]

from todo-tree.

Darksoulsong avatar Darksoulsong commented on September 28, 2024 18

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/*"
  ]

from todo-tree.

Gruntfuggly avatar Gruntfuggly commented on September 28, 2024 11

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"]

from todo-tree.

GeorgeWL avatar GeorgeWL commented on September 28, 2024 10

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.

from todo-tree.

WarHatch avatar WarHatch commented on September 28, 2024 10

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

from todo-tree.

Gruntfuggly avatar Gruntfuggly commented on September 28, 2024 6

I've added **/node_modules to the default exclude globs for the next release.

from todo-tree.

Gruntfuggly avatar Gruntfuggly commented on September 28, 2024 3

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.

from todo-tree.

LarsOlt avatar LarsOlt commented on September 28, 2024 3

I've added **/node_modules to the default exclude globs for the next release.

**/node_modules didn't work for me. I had to use **/node_modules/*

from todo-tree.

abumalick avatar abumalick commented on September 28, 2024 1

Yes you are right I think, the file was probably opened in the editor.

Thank you very much 👍

from todo-tree.

semenov-k avatar semenov-k commented on September 28, 2024

@lijialiang how did you solve this problem?

from todo-tree.

GeorgeWL avatar GeorgeWL commented on September 28, 2024

don't you think node modules should be hidden by default?

from todo-tree.

Gruntfuggly avatar Gruntfuggly commented on September 28, 2024

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.

from todo-tree.

Gruntfuggly avatar Gruntfuggly commented on September 28, 2024

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.

from todo-tree.

abumalick avatar abumalick commented on September 28, 2024

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

from todo-tree.

Gruntfuggly avatar Gruntfuggly commented on September 28, 2024

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)...

from todo-tree.

jacobedawson avatar jacobedawson commented on September 28, 2024

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 ^ )

from todo-tree.

BlackSnowden avatar BlackSnowden commented on September 28, 2024

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"]

Thanks! Work perfectly

from todo-tree.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.