How do you ignore directories using projectile so that SPC p f
does not shows the resources
directory? I don't want to put this directory in .gitignore for obvious reasons. Tried switching to 'native indexing method, adding .projectile file, specifying ignored directories via projectile-globally-ignored-directories seems to not work either.
馃槥
@karol.wojcik a .projectile file that contains ignore patters is what I would used. Reopen any open files from the project for the .projectile file to be loaded (or restart Emacs).
@jr0cket do you use ivy?
No, I use Helm.
Maybe that's the issue.
I'm using Ivy
I also have repgrip installed. From a quick search there is mention of invalidating the cache (not sure how) Also mention of using a .ignore file with patterns to exclude
@jr0cket Actually there is no difference. Tried helm with the following .projectile content:
-resources
Regarding repgrip I got it installed as well and using .ignore file works perfect when using SPC /
.
I think that it's some kind of projectile issue which is not respecting the .projectile file in alien mode.To be frank I had it working for few searches when using native mode then it switched back to indexing "resources". 馃槥
@jr0cket When it comes to invalidating the cache you can do it by using SPC p I
If invalidating the cache doesn't work then I am out of ideas, sorry. Probably should raise a bug on Spacemacs
Will do. Thank you very much though!
I'll see if I can replicate the issue later when I get to the computer.
Sure thing!
Got a workaround:
(progn
(make-local-variable 'projectile-globally-ignored-directories)
(add-to-list 'projectile-globally-ignored-directories "resources")
(set 'projectile-globally-ignored-directories projectile-globally-ignored-directories)
(defun f/invalidate-resources-cache ()
(interactive)
(projectile-purge-dir-from-cache "resources"))
(f/invalidate-resources-cache))
As long as you don't invalidate cache of the project it will work 馃槃