X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d%2Fconfig.org;fp=emacs.d%2Fconfig.org;h=166f110b5b5beac562a20630cdb7fdc9795f0379;hb=770a6c63f6f4cd687ce659ef608b7856acb3f31a;hp=76330edcd0738abac73d4c68c0578a109b96f3fd;hpb=5456b174d287b33de766c91df9eee27a0993d241;p=dotfiles.git diff --git a/emacs.d/config.org b/emacs.d/config.org index 76330ed..166f110 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -3086,6 +3086,31 @@ Use =ESC= to exit minibuffer. Also I map =Super-h= the same as =C-g= (let ((root (projectile-project-root))) (with-current-buffer buffer (cd root)))))) + + + + ;; https://emacs.stackexchange.com/questions/16497/how-to-exclude-files-from-projectile + (setq projectile-enable-caching t) + (if (executable-find "rg") + (progn + (defconst modi/rg-arguments + `("--line-number" ; line numbers + "--smart-case" + "--follow" ; follow symlinks + "--mmap") ; apply memory map optimization when possible + "Default rg arguments used in the functions in `projectile' package.") + + (defun modi/advice-projectile-use-rg () + "Always use `rg' for getting a list of all files in the project." + (mapconcat 'identity + (append '("\\rg") ; used unaliased version of `rg': \rg + modi/rg-arguments + '("--null" ; output null separated results, + "--files")) ; get file names matching the regex '' (all files) + " ")) + + (advice-add 'projectile-get-ext-command :override #'modi/advice-projectile-use-rg)) + (message "rg is not found")) #+END_SRC *** project config =super= keybindings