Fix projectile-find-file locking up Emacs

This occurs when invoking it from the root of massive file trees, like
$HOME or certain non-project folders. It's better that it defer to a
different command altogether (counsel-find-file) if invoked from $HOME,
and counsel-file-jump from anywhere else, which offers approximately
what we want, but at a fraction of the performance cost in those cases.
This commit is contained in:
Henrik Lissner 2018-08-03 16:10:20 +02:00
parent 31c8c0c033
commit 3673067736
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 19 additions and 1 deletions

View file

@ -159,7 +159,7 @@ immediately runs it on the current candidate (ending the ivy session)."
counsel-projectile-grep counsel-projectile-ag counsel-projectile-switch-project)
:init
(define-key! 'global
[remap projectile-find-file] #'counsel-projectile-find-file
[remap projectile-find-file] #'+ivy/projectile-find-file
[remap projectile-find-dir] #'counsel-projectile-find-dir
[remap projectile-switch-to-buffer] #'counsel-projectile-switch-to-buffer
[remap projectile-grep] #'counsel-projectile-grep