mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Refactor Project API to reflect changes upstream
projectile-project-root no longer returns `default-directory` if not in a project (it returns nil). As such, doom-project-* functions (and their uses) have been refactored. + doom-project-p & doom-project-root are aliases for projectile-project-p & projectile-project-root. + doom-project-{p,root,name,expand} now has a DIR argument (for consistency, since projectile-project-name and projectile-project-expand do not). + The nocache parameter is no longer necessary, as projectile's caching behavior is now more sane. + Removed some projectile advice/hacks that are no longer necessary. + Updated unit tests
This commit is contained in:
@ -217,11 +217,11 @@ The point of this is to avoid Emacs locking up indexing massive file trees."
|
||||
(interactive)
|
||||
(call-interactively
|
||||
(cond ((or (file-equal-p default-directory "~")
|
||||
(when-let* ((proot (doom-project-root 'nocache)))
|
||||
(when-let* ((proot (doom-project-root)))
|
||||
(file-equal-p proot "~")))
|
||||
#'counsel-find-file)
|
||||
|
||||
((doom-project-p 'nocache)
|
||||
((doom-project-p)
|
||||
(let ((files (projectile-current-project-files)))
|
||||
(if (<= (length files) ivy-sort-max-size)
|
||||
#'counsel-projectile-find-file
|
||||
|
Reference in New Issue
Block a user