how do I get my Helm Projectile Grep
SPC /
to ignore all .js files.
I have included the *.js
entry in my gitignore, but the global search above still pulls it up.
@murtaza52 I use the globbing option to ignore a file extension in search -g!*.js
https://practicalli.github.io/spacemacs/spacemacs-basics/working-with-projects/searching-projects.html
This works if you have ripgrep or silver-searcher binaries installed
@jr0cket I installed ripgrep
now how do I ensure that it is being used for searching ?
also is there no way to specify that these files should alwways be excluded in any searching ?
Even when I search for files SPC p f
I dont want generated .js files to show up, how do I do that ?
Does this help: https://emacs.stackexchange.com/questions/16497/how-to-exclude-files-from-projectile ?
@murtaza52 if ripgrep is found on the executable path, then it is used. There is a setting in .spacemacs to define a custom order, but by default it will look for ripgrep first.
You can add a .projectile file in the root of a project and add patterns. However, I thought projectile excluded patterns from .gitignore too.
Thats the plan, yet if you recall, i had the same issue. There are cases where it doesn't work, maybe due to what underpins the SPC / command or the project structure. I guess i should get better about making bug reports, but its hard to switch context off your job to make a good report.
I am aware projectile doesnt load in changed files when you already have a project open, so I assume a change .gitignore may not be used until after a new file is open from that project. This is certainly the case for .dir-locals.el
files, so imagine its the same for .gitignore
.
Of course there could be a bug in projectile too..
Try reload one of the project files after changing the .gitignore file to get projectile to re-read the .gitignore file
But I'm not sure if that's projectile's fault or the underlying tool (`rg` here)
According to ripgrep docs it does ignore the patterns in .gitignore
along with other things https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#automatic-filtering