From 9f6d187ea3fb1f621296af61fc74da01126562d1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 16 Apr 2017 11:55:47 -0400 Subject: [PATCH] core-projects: disable projectile-locate-dominating-file in remote buffers --- core/core-projects.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/core-projects.el b/core/core-projects.el index 43209f888..6cbdfe97b 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -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)