atom/fuzzy-finder

Prevent reindexing on focus via config

Opened this issue · 2 comments

Hello,

This isn't a bug, but something that I've fixed in a local fork of fuzzy-finder and I wanted to ask if you'd like a PR with the change or not. No worries if not :)

I found on a large project that reindexing everytime the window was refocused was overkill - 95% of the time I'd say I'm not really creating new files, so I don't need to reindex as often. I know there are issues about reindexing like #88, but a simple fix for me was to add a config item, reIndexOnFocus, defaulting to true, that would enable users to disable this if they wanted to.

In addition I added a listener to listen out to new files being added to the project, and reindex when that happens.

I made the changes in my fork here: jackfranklin@8326354. (Ignore the renaming, I just did that to avoid collisions). If you would like a PR I'd be happy to tidy the code up and make a PR with that change.

Thank you for all your hard work on Atom :)

Jack.

ungb commented

@jackfranklin This is something I think we'd consider since it's a option. The option probably needs a bit more details than what it has currently.

I tried testing your sha you provided and it seems like regardless of what setting I set it reindexes. I see the opposite when I try your fork from master. It seems the setting was removed.

I would create a PR for this and we can take it from there. Also would be nice to have test to ensure this setting is always working.

Hey @jackfranklin! Are you still using atom? If so could you create a PR with this option?