Remove "fix" for projectile + $HOME git repos

There are legitimate reasons why a user would want to treat $HOME as a
project. 'doom doctor' now complains about this case in greater detail.
I'll leave it to users to deal with this edge case.
This commit is contained in:
Henrik Lissner 2021-05-23 21:55:20 -04:00
parent 3a0bf17f2f
commit e5b52e2a50
2 changed files with 6 additions and 15 deletions

View file

@ -138,19 +138,6 @@ c) are not valid projectile projects."
and do (remhash proot projectile-project-type-cache))
(projectile-serialize-cache))))
;; 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 less
;; accurate in some cases.
(let ((default-directory "~"))
(when (cl-find-if #'projectile-file-exists-p
projectile-project-root-files-bottom-up)
(doom-log "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)))
;; Some MSYS utilities auto expanded the `/' path separator, so we need to prevent it.
(when IS-WINDOWS
(setenv "MSYS_NO_PATHCONV" "1") ; Fix path in Git Bash