From: Amin Bandali Date: Thu, 23 Aug 2018 20:19:42 +0000 (-0400) Subject: [emacs] use-package projectile X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/commitdiff_plain/9b646b53ba2ae709bc696af3465d4dbc93e5f86e?ds=inline [emacs] use-package projectile --- diff --git a/init.org b/init.org index da741f1..cb5d1f0 100644 --- a/init.org +++ b/init.org @@ -1132,6 +1132,27 @@ Emacs package that displays available keybindings in popup ("" . mwim-end-of-line-or-code))) #+end_src +** projectile + +#+begin_src emacs-lisp +(use-package projectile + :defer 5 + :bind-keymap ("C-c p" . projectile-command-map) + :config + (projectile-global-mode) + + (defun my-projectile-invalidate-cache (&rest _args) + ;; ignore the args to `magit-checkout' + (projectile-invalidate-cache nil)) + + (eval-after-load 'magit-branch + '(progn + (advice-add 'magit-checkout + :after #'my-projectile-invalidate-cache) + (advice-add 'magit-branch-and-checkout + :after #'my-projectile-invalidate-cache)))) +#+end_src + * Email ** [[https://notmuchmail.org][notmuch]]