core-projects: disable projectile-locate-dominating-file in remote buffers

This commit is contained in:
Henrik Lissner 2017-04-16 11:55:47 -04:00
parent 68d5e9665e
commit 9f6d187ea3

View File

@ -37,6 +37,14 @@ state are passed in.")
("html" "jade" "pug" "jsx" "tsx"))
projectile-other-file-alist))
;; Projectile root-searching functions cause an endless loop on TRAMP
;; connections, so we disable them.
(defun doom*projectile-locate-dominating-file (orig-fn &rest args)
"Don't traverse the file system if a remote connection."
(unless (file-remote-p default-directory)
(apply orig-fn args)))
(advice-add 'projectile-locate-dominating-file :around 'doom*projectile-locate-dominating-file)
(defun doom*projectile-cache-current-file (orig-fun &rest args)
"Don't cache ignored files."
(unless (cl-some (lambda (path)