Disable bottom-up root search if HOME is a project #833
This commit is contained in:
parent
247b219ea1
commit
d7e4901bda
1 changed files with 13 additions and 0 deletions
|
@ -32,6 +32,19 @@
|
|||
("less" "css")
|
||||
("styl" "css"))))
|
||||
|
||||
;; It breaks projectile's project root resolution if HOME is a project (e.g.
|
||||
;; it's a git repo). In that case, we disable bottom-up root searching to
|
||||
;; prevent issues. This makes project resolution a little slower and may cause
|
||||
;; incorrect project roots in other edge cases.
|
||||
(let ((default-directory "~"))
|
||||
(when (cl-find-if #'projectile-file-exists-p
|
||||
projectile-project-root-files-bottom-up)
|
||||
(message "HOME appears to be a project. Disabling bottom-up root search.")
|
||||
(setq projectile-project-root-files
|
||||
(append projectile-project-root-files-bottom-up
|
||||
projectile-project-root-files)
|
||||
projectile-project-root-files-bottom-up nil)))
|
||||
|
||||
;; Projectile root-searching functions can cause an infinite loop on TRAMP
|
||||
;; connections, so disable them.
|
||||
(defun doom*projectile-locate-dominating-file (orig-fn &rest args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue