about summary refs log tree commit diff stats
path: root/.emacs.d/lisp/init-minibuffer.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp/init-minibuffer.el')
-rw-r--r--.emacs.d/lisp/init-minibuffer.el7
1 files changed, 1 insertions, 6 deletions
diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el
index 3b01339..57f617c 100644
--- a/.emacs.d/lisp/init-minibuffer.el
+++ b/.emacs.d/lisp/init-minibuffer.el
@@ -280,12 +280,7 @@ DEFS is a plist associating completion categories to commands."
 
   (setq consult-narrow-key "<")
 
-  (setq consult-project-root-function
-        (lambda ()
-          (if-let (project (project-current))
-            (project-root project)
-            (when-let (persp (persp-name (persp-curr)))
-              (car (seq-filter (lambda (pr) (string-match-p persp pr)) (project-known-project-roots)))))))
+  (setq consult-project-root-function #'persp-current-project-root)
 
   ;; Switches perspective if we select a buffer from another perspective, but note that previewing
   ;; a buffer adds it to the current perspective, so preview should be disabled before removing