                            "--files")) ; get file names matching the regex '' (all files)
                  " "))
       (advice-add 'projectile-get-ext-command :override #'advice-projectile-use-rg)))
+
+(setq projectile-globally-ignored-directories
+      (append '(
+        ".git"
+        ".svn"
+        "out"
+        "repl"
+        "project"
+        "target"
+        "venv") projectile-globally-ignored-directories))
+(setq projectile-globally-ignored-files
+      (append '(
+        ".DS_Store"
+        "TAGS"
+        "*.gz"
+        "*.pyc"
+        "*.jar"
+        "*.tar.gz"
+        "*.tgz"
+        "*.zip") projectile-globally-ignored-files))
 
 ;; use projectile everywhere
 (projectile-mode)

 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(whitespace-line ((t (:background "gray6" :foreground "gray13"))))
 '(whitespace-space ((t (:background "gray6" :foreground "gray13"))))
 '(whitespace-tab ((t (:background "gray6" :foreground "gray13")))))

;; useful for very large projects
(setq projectile-enable-caching t)

(setq projectile-require-project-root nil)

(when (executable-find "rg")
  (progn
    (defconst modi/rg-arguments
