I am aware that you can customise the "find" command executed when using "find-grep" with "setq grep-find-command" and define which file-patterns to ignore in the search. I would like to take this further and be able to read the patterns to ignore from a file.
Each framework or tool might generate different files that I would like to be ignored in search. For example, SASS generates ".sass-cache" folder, the Symfony framework stores the "logs" and the "cache" in respectively named folders, while Haskell stack creates a ".stack-work" folder.
Instead of customising the "find-grep" command to exclude all patterns from different frameworks/tools, I would prefer a system where you can add a ".findignore" file in the root folder of the project and "find-grep" should be picking up the exclusions from there.
A couple of questions:
1) Is there such a solution already out there?
2) If not, advice on how to go about the following two requirements would help me get started:
- How can I detect the .findignore file upwards up to the root folder of the project (just like .gitignore).
- How to load each line and sequence it as an argument to "find-grep"
I haven't done advanced emacs customisations so any hints would be appreciated.