Skip to content

Commit

Permalink
projectile fixed bbatsov/projectile#1812
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvader committed Jan 1, 2023
1 parent 5badaf2 commit 769332a
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions init.d/50-random.el
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,13 @@
:ensure t
:diminish
:config
(eriks/hotfix
'projectile
(defun eriks/projectile-root-top-down (dir &optional list)
"An actually working version of `projectile-root-top-down'.
This issue is raised at: https://github.com/bbatsov/projectile/issues/1729"
(let ((root (projectile-root-bottom-up dir list)))
(when (and root
(not (string-equal root (expand-file-name "~")))
(not (string-equal root "/")))
(setq root (or (eriks/projectile-root-top-down (projectile-parent root) list)
root)))
root)))
(defun eriks/projectile-top-down-projectile-file (dir)
"Finds the top-most directory with the file '.projectile', or nil
if there is no such directory."
(eriks/projectile-root-top-down dir '(".projectile")))
(put 'projectile-project-root 'safe-local-variable #'stringp)
(projectile-mode 1)
:general
('projectile-mode-map
:prefix "C-c"
"p" 'projectile-command-map)
:custom
(projectile-project-root-functions '(projectile-root-local
eriks/projectile-top-down-projectile-file
projectile-root-bottom-up
projectile-root-top-down
projectile-root-top-down-recurring))
(projectile-completion-system 'ivy))

(use-package yasnippet
Expand Down

0 comments on commit 769332a

Please sign in to comment.