Fork me on GitHub
#spacemacs
<
2020-05-17
>
murtaza5209:05:14

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.

practicalli_john12:05:39

This works if you have ripgrep or silver-searcher binaries installed

murtaza5213:05:42

@jr0cket I installed ripgrepnow how do I ensure that it is being used for searching ?

murtaza5213:05:12

also is there no way to specify that these files should alwways be excluded in any searching ?

murtaza5213:05:57

Even when I search for files SPC p fI dont want generated .js files to show up, how do I do that ?

practicalli_john15:05:43

@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.

practicalli_john15:05:42

You can add a .projectile file in the root of a project and add patterns. However, I thought projectile excluded patterns from .gitignore too.

aisamu15:05:01

Yup, SPC / takes .gitignore into account

drewverlee14:05:22

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.

practicalli_john15:05:12

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 .

practicalli_john15:05:35

Of course there could be a bug in projectile too..

practicalli_john15:05:00

Try reload one of the project files after changing the .gitignore file to get projectile to re-read the .gitignore file

aisamu15:05:25

But I'm not sure if that's projectile's fault or the underlying tool (`rg` here)

practicalli_john16:05:35

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