Emacs consult, vertico, orderless tweaks

This commit is contained in:
Ian Keane 2026-08-06 16:05:46 -04:00
parent 4c18be1f59
commit 39ef7b57eb

View file

@ -591,7 +591,7 @@ I know these could be bound on a per-package basis, but since this is my primary
"ct" '(+lookup/type-definition :which-key "Find type definition") "ct" '(+lookup/type-definition :which-key "Find type definition")
"cw" '(delete-trailing-whitespace :which-key "Delete trailing whitespace") "cw" '(delete-trailing-whitespace :which-key "Delete trailing whitespace")
;; "cn" '(doom/delete-trailing-newlines :which-key "Delete trailing newlines") ;; "cn" '(doom/delete-trailing-newlines :which-key "Delete trailing newlines")
"cx" '(+default/diagnostics :which-key "List errors") "cx" '(consult-lsp-diagnostics :which-key "List errors")
;; File ;; File
"f" '(:ignore t :which-key "File") "f" '(:ignore t :which-key "File")
@ -614,7 +614,7 @@ I know these could be bound on a per-package basis, but since this is my primary
"gG" '(magit-status-here :which-key "magit status here") "gG" '(magit-status-here :which-key "magit status here")
"gL" '(magit-log-buffer-file :which-key "magit buffer log") "gL" '(magit-log-buffer-file :which-key "magit buffer log")
"gt" '(git-timemachine-toggle :which-key "git time machine") "gt" '(git-timemachine-toggle :which-key "git time machine")
"g/" '(consult-git-log-grep :which-key "Search git log")
"gd" '(:ignore t :which-key "dispatch") "gd" '(:ignore t :which-key "dispatch")
"gdF" '(forge-dispatch :which-key "Forge dispatch") "gdF" '(forge-dispatch :which-key "Forge dispatch")
"gdd" '(magit-dispatch :which-key "Magit dispatch") "gdd" '(magit-dispatch :which-key "Magit dispatch")
@ -1033,13 +1033,27 @@ I know these could be bound on a per-package basis, but since this is my primary
(use-package vertico (use-package vertico
:init :init
(vertico-mode) (vertico-mode)
) :config
(setq vertico-cycle t)
:bind (:map vertico-map
("DEL" . vertico-directory-delete-char)
("M-DEL" . vertico-directory-delete-word)))
#+end_src #+end_src
** Consult ** Consult
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package consult (use-package consult
:bind (:map minibuffer-local-map ("C-r" . consult-history))) :bind (:map minibuffer-local-map ("C-r" . consult-history))
(setq consult-ripgrep-args "rg --null --line-buffered --color=never --max-columns=1000 --path-separator / --smart-case --no-heading --with-filename --line-number --search-zip --hidden") :init
(setq register-preview-delay 0.3
register-preview-function #'consult-register-format)
(advice-add #'register-preview :override #'consult-register-window)
(setq xref-show-xrefs-function #'consult-xref
xref-show-definitions-function #'consult-xref)
:config
(setq consult-ripgrep-args "rg --null --line-buffered --color=never --max-columns=1000 --path-separator / --smart-case --no-heading --with-filename --line-number --search-zip --hidden")
(consult-customize
consult-recent-file consult-buffer :preview-key "M-.")
(setq completion-in-region-function #'consult-completion-in-region))
#+end_src #+end_src
@ -1067,6 +1081,7 @@ Idk I think this came from the vertico readme
(setq enable-recursive-minibuffers t)) (setq enable-recursive-minibuffers t))
(setq completion-styles '(basic substring partial-completion flex)) (setq completion-styles '(basic substring partial-completion flex))
;; Note: overridden below by orderless
#+end_src #+end_src
** Orderless ** Orderless
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -1117,7 +1132,6 @@ Idk I think this came from the vertico readme
;; strategy, if you want to see the documentation from multiple providers. ;; strategy, if you want to see the documentation from multiple providers.
;; (add-hook 'eldoc-documentation-functions #'embark-eldoc-first-target) ;; (add-hook 'eldoc-documentation-functions #'embark-eldoc-first-target)
(define-key evil-normal-state-map (kbd "C-.") 'embark-act) (define-key evil-normal-state-map (kbd "C-.") 'embark-act)
(evil-define-key 'normal evil-normal-state-map (kbd "C-.") 'embark-act)
:config :config