Fork me on GitHub
Drew Verlee15:08:39

Is anyone successful able to ignore files when using a projectile project search? googling has given me answers that i feel i tried in the past and never worked.


@drewverlee Projectile should ignore your .gitignore patterns by default I can ignore files when searching with ripgrep using the -g! option followed by the filename pattern. So to find my-function but not in markdown files I can use -g!*.md my-function To search only in .clj files, then just use -g without the !


@U05254DQM do you happen to know if there's a way to actually include files listed in .gitignore ?


If I read the docs correctly, then you should be able to create a .projectile file in the same directory as your .gitignore and starting each line of the pattern with a !

I guess just copying your .gitignore file to .projectile and adding ! to the start of each line would be quickest way.


Let me know if that works or you find a better way 😀


Seems to work but I realized I'm actually more interested in including those files when doing fulltext search (`helm-project-do-ag` et al.)


I think silver searcher should also work, but not all search tools may work, or have different options

Drew Verlee21:08:13

Thanks, I'll give that a try