Open jackmott opened 8 years ago
From the Fuzzy Finder docs:
This package uses both the core.ignoredNames and fuzzy-finder.ignoredNames config settings to filter out files and folders that will not be shown. Both of those config settings are interpreted as arrays of minimatch glob patterns.
Wonder how hard it would be for atom-tree-ignore to edit this setting.
Sooo... turns out this is not hard. i can edit it via the atom chrome inspector trivially, and it changes the ignore for both the treeview and fuzzy-finder automatically.
Unless I'm missing something really obvious, most of the code in tree-ignore.js that does the hiding and showing via css element .tree-ignore-element
is useless. Since once you set core.ignoredNames
, everything hides automatically.
I'm editing the package now to try to hack in support for changing this config. This is my first time editing anything on atom so it'll probably be a shit show. But let's see if it works :)
Good luck! Thanks for taking it on.
Well... i got it working. But there's a big flaw in my plan. Setting core.ignoredNames
seems to set it globally, on all projects
Seems like Atom needs some internal upgrades before .atomignore
is going to really be usable by anyone. Damn shame
You can try the fork for yourself here: https://github.com/jacquescrocker/atom-ignore
Its a big problem from atom and config, the fact that the config is global and can't really be changed on project-basis.
I've tryed to make a package for that, atom-local-config, but, due to the core behavior of Atom regarding config, it's very random. You can dig into this plugin to see.
Th problem has been discussed on Atom's forums, I don't know if it is on their shortlist.
hmm, i got an idea from #27
what if we just monkey patched the atom core api method repo.isPathIgnored()
we'd check the local path first, and then fallback to the default functionality
repos are already scoped to the project you are already on, so that would make it work.
// this will break your local project until reload, be careful :)
repo = atom.project.getRepositories()[0]
repo.isPathIgnored = function(path){ console.log("Atom -- can eat my atom: "+path); return true; }
and watch the insanity
Looks like fuzzy-finder does some aggressive caching, so even with the monkey patch, it doesn't pick things up right away.
Related to this horrible issue which bites me in the ass almost every day :( https://github.com/atom/fuzzy-finder/issues/168
Feel free to dig... I'll be quite busy for the next days to do code on this package, but can merge and publish if you find something useful.
Cool, it works! I got it functional here: https://github.com/jacquescrocker/atom-ignore
+1
Environment:
.atomignore
AlphaFrontStatic/scripts/*.js
Bug
When navigating down through the list of files in a folder by pressing the up and down arrow keys, the selection will pass through the ignored files, such that a folder full of .ts and .js files, where .js files are ignored, makes it such that you have to double tap the down arrow key to move from one file to the next.