I'm having a hard time figuring out how to ignore all the crap subversion drops all over my filesystem (svn is not my choice, have to use it for work :( ).
I've tried adding lines in a .projectile file and I've tried adding these patterns to projectile-globally-ignored-(dirs/files)
I'm using Linux and 24.3.
Here is what I have in init.el:
(require 'projectile)
(setq projectile-enable-caching t)
(setq projectile-globally-ignored-directories (append '(".svn") projectile-globally-ignored-directories))
(setq projectile-globally-ignored-files (append '("*.svn-base" "*.o" "*.pyc") projectile-globally-ignored-files))
(setq projectile-use-native-indexing nil)
(projectile-global-mode)
.projectile is only consulted when projectile-use-native-indexing is set to t.
I see. I understand now that "native" means elisp. I understood it previously to mean something like "native to the system".
Native indexing was far too slow though for the size of the codebase. I had to kill emacs after waiting 20 minutes to build the cache.
My solution instead was to just use .gitignore and init and empty git repo at the root of the project.
hya
what does one do if i want to ignore then file from projectile, yet still use them when i git push etc?
best
Z
it may be good to include the option to do this globally in the docs as an alternative to a .project file
i can add this in a quick PR if you like @bbatsov, :+1: or :-1: ?
;;; project management
(require 'projectile)
(setq projectile-require-project-root nil)
(setq projectile-enable-caching t)
(setq projectile-globally-ignored-directories
(append '(
".git"
".svn"
"out"
"repl"
"target"
"venv"
)
projectile-globally-ignored-directories))
(setq projectile-globally-ignored-files
(append '(
".DS_Store"
"*.gz"
"*.pyc"
"*.jar"
"*.tar.gz"
"*.tgz"
"*.zip"
)
projectile-globally-ignored-files))
(projectile-global-mode)
@chadhs
I added it, but it doesn't work for me. It shows *.zip and *.png flies. Can you explain what is wrong? My config is
;; projectile
(unless (package-installed-p 'projectile)
(package-install 'projectile))
(require 'projectile)
(projectile-mode t)
(setq projectile-require-project-root nil)
(setq projectile-enable-caching t)
(setq projectile-globally-ignored-directories
(append '(
".git"
".svn"
"out"
"repl"
"target"
"venv"
)
projectile-globally-ignored-directories))
(setq projectile-globally-ignored-files
(append '(
".DS_Store"
"*.gz"
"*.pyc"
"*.jar"
"*.tar.gz"
"*.tgz"
"*.zip"
"*.png"
)
projectile-globally-ignored-files))
@azhidkov add config "(setq projectile-indexing-method 'native)"
and clear cache with command "projectile-invalidate-cache"
Most helpful comment
it may be good to include the option to do this globally in the docs as an alternative to a .project file
i can add this in a quick PR if you like @bbatsov, :+1: or :-1: ?