Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Make the file tree ignore files that match the "Ignored Names" core setting #76

Open
oclbdk opened this issue Jun 23, 2015 · 4 comments

Comments

@oclbdk
Copy link
Contributor

oclbdk commented Jun 23, 2015

Go into Settings and set a value for "Ignored Names". The file tree should fade out files that match that config in the same way that it fades out ignored version-control files.

@ddgromit
Copy link

+1 its indexing stuff in /tmp for me (though not node_modules for some reason)

for reference, here's how tree view does it:

Loading paths from the config: https://github.com/atom/tree-view/blob/bddaea5a4e5bd18efd30215e59c8fab0071b29ac/lib/tree-view.coffee#L235
Running the match: https://github.com/atom/tree-view/blob/master/lib/directory.coffee#L91

@ddgromit
Copy link

The index is built from git ls-files if it exists, and falls back to find if there's no repo. So the simplest way to ignore a directory is to add it to .gitignore for your project. See PathSetFactory.js for more details.

I tried filtering the results in the factory as part of the promise chain createPathSet uses, but since file search is on the server-end, it doesn't have direct access to atom configuration values e.g. through getConfigValueAsync().

To implement this, it looks like ignored paths would have to be passed through from the component to the NuclideSearchService, then to fileSearchForDirectory in the PathSearch provider. It's kind of a lot of places to make changes. Is there any other way to funnel the ignored directories config through to the file searcher?

@ssorallen
Copy link
Contributor

This made it into master with commit 97c423f

@johnslemmer
Copy link

This looks like it is working for me now. Maybe close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants