mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Disable bottom-up root search if HOME is a project #833
This commit is contained in:
@ -32,6 +32,19 @@
|
||||
("sass" "css")
|
||||
("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.
|
||||
|
Reference in New Issue
Block a user