mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix(ivy): counsel-projectile-switch-project: empty list on first run
This is due to `counsel-projectile-switch-project` not initializing the known projects list before consulting the `projectile-known-projects` variable (or at the very least, calling the function of the same name, rather than referencing the variable directly). By changing counsel-projectile-remove-current-project, it now does.
This commit is contained in:
@ -326,6 +326,14 @@ workable results ripgrep produces, despite the error."
|
||||
(setf (alist-get 'projectile-find-file counsel-projectile-key-bindings)
|
||||
#'+ivy/projectile-find-file)
|
||||
|
||||
;; HACK: Force `counsel-projectile-switch-project' to call
|
||||
;; `projectile-relevant-known-projects' and initialize the known projects
|
||||
;; list, because otherwise it's trying to read from the
|
||||
;; `projectile-known-projects' variable directly instead of calling the
|
||||
;; function of the same name.
|
||||
;; REVIEW: This should be fixed upstream.
|
||||
(setq counsel-projectile-remove-current-project t)
|
||||
|
||||
;; no highlighting visited files; slows down the filtering
|
||||
(ivy-set-display-transformer #'counsel-projectile-find-file nil)
|
||||
|
||||
|
Reference in New Issue
Block a user