Change projectile dirconfig file to .project (#2829)

* Change projectile dirconfig file to .project

So it matches the doom project marker `.project`. Otherwise you need to
create both a `.project` and then a `.projectile` with the project
configuration.

To maintain backwards compatibility, it will prefer a `.projectile` file for
dirconfig if found.
This commit is contained in:
James Ravn 2020-04-07 22:31:44 +01:00 committed by GitHub
parent 76097f84fa
commit 68eb41faa3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,6 +75,14 @@ Emacs.")
(push (abbreviate-file-name doom-local-dir) projectile-globally-ignored-directories) (push (abbreviate-file-name doom-local-dir) projectile-globally-ignored-directories)
;; Override projectile's dirconfig file '.projectile' with doom's project marker '.project'.
(defadvice! doom--projectile-dirconfig-file-a ()
:override #'projectile-dirconfig-file
(cond
;; Prefers '.projectile' to maintain compatibility with existing projects.
((file-exists-p! (or ".projectile" ".project") (projectile-project-root)))
((expand-file-name ".project" (projectile-project-root)))))
;; Disable commands that won't work, as is, and that Doom already provides a ;; Disable commands that won't work, as is, and that Doom already provides a
;; better alternative for. ;; better alternative for.
(put 'projectile-ag 'disabled "Use +{ivy,helm}/project-search instead") (put 'projectile-ag 'disabled "Use +{ivy,helm}/project-search instead")