diff options
author | David Morgan <djm_uk@protonmail.com> | 2022-07-27 14:08:14 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2022-07-27 14:08:14 +0100 |
commit | 619f0127d60664c8db2d4d89fe14a2c093875464 (patch) | |
tree | 2f3356ecccf80c1f69963dd75e5e830c4fd91a67 | |
parent | 495fe63341ba06e04d1864c415bbe05df15ece53 (diff) | |
download | dotfiles-619f0127d60664c8db2d4d89fe14a2c093875464.tar.gz |
consult-project-extra-find default narrowing
-rw-r--r-- | .emacs.d/lisp/init-minibuffer.el | 3 | ||||
-rw-r--r-- | .emacs.d/lisp/init-project.el | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el index 5245ba9..cde4304 100644 --- a/.emacs.d/lisp/init-minibuffer.el +++ b/.emacs.d/lisp/init-minibuffer.el @@ -323,7 +323,8 @@ DEFS is a plist associating completion categories to commands." (defvar consult-initial-narrow-config '((consult-buffer . ?x) (consult-buffer-no-preview . ?x) - (consult-buffer-other-window . ?x))) + (consult-buffer-other-window . ?x) + (consult-project-extra-find . ?f))) ;; Add initial narrowing hook (defun consult-initial-narrow () (when-let (key (alist-get this-command consult-initial-narrow-config)) diff --git a/.emacs.d/lisp/init-project.el b/.emacs.d/lisp/init-project.el index 123b98c..8fe7c3f 100644 --- a/.emacs.d/lisp/init-project.el +++ b/.emacs.d/lisp/init-project.el @@ -43,10 +43,15 @@ (interactive) (let ((default-directory "~/src/")) (call-interactively #'project-switch-project))) + (defun project-switch-consult-project-extra-find () + (interactive) + (progn + (setq unread-command-events (listify-key-sequence "f ")) + (consult-project-extra-find))) (add-to-list 'project-switch-commands '(?h "Recentf" project-recentf) t) (add-to-list 'project-switch-commands '(?r "consult-ripgrep" consult-ripgrep) t) - (add-to-list 'project-switch-commands '(?p "consult-project-extra-find" consult-project-extra-find) t) + (add-to-list 'project-switch-commands '(?p "consult-project-extra-find" project-switch-consult-project-extra-find) t) (add-to-list 'project-switch-commands '(?m "Magit" magit-status) t) (add-to-list 'project-switch-commands '(?q "Replace Regexp" project-query-replace-regexp) t) |