Fix SPC f F w/ vertico + consult

Not a perfect analogue to counsel-file-jump, but it's a start (and
better than the previous no-op).
This commit is contained in:
Henrik Lissner 2021-07-25 17:55:59 -04:00
parent 54a556c2fa
commit dd9657d90d
2 changed files with 4 additions and 1 deletions

View file

@ -128,6 +128,9 @@ If DIR is not a project, it will be indexed (but not cached)."
(if (doom-module-p :completion 'ivy) (if (doom-module-p :completion 'ivy)
#'counsel-projectile-find-file #'counsel-projectile-find-file
#'projectile-find-file))) #'projectile-find-file)))
((and (bound-and-true-p vertico-mode)
(fboundp 'consult-find))
(consult-find default-directory))
((and (bound-and-true-p ivy-mode) ((and (bound-and-true-p ivy-mode)
(fboundp 'counsel-file-jump)) (fboundp 'counsel-file-jump))
(call-interactively #'counsel-file-jump)) (call-interactively #'counsel-file-jump))

View file

@ -36,7 +36,7 @@
(interactive) (interactive)
(if (featurep! :completion ivy) (if (featurep! :completion ivy)
(call-interactively #'counsel-file-jump) (call-interactively #'counsel-file-jump)
(cmd! (doom-project-find-file default-directory)))) (doom-project-find-file default-directory)))
;;;###autoload ;;;###autoload
(defun +default/discover-projects (arg) (defun +default/discover-projects (arg)