Browse Source

Emacs: Don't fuzzy search in consult-line

master
Riyyi 9 months ago
parent
commit
1fb041fffc
  1. 3
      .config/emacs/site-lisp/dot-keybinds.el
  2. 13
      .config/emacs/site-lisp/dot-selection.el

3
.config/emacs/site-lisp/dot-keybinds.el

@ -505,7 +505,8 @@
"s l" '(avy-goto-line :which-key "Avy goto line")
"s p" '(consult-grep :which-key "Search project")
"s q" '(evil-ex-nohighlight :which-key "Stop search")
"s s" '(consult-line :which-key "Search buffer")
"s s" '(dot/consult-line-no-fuzzy :which-key "Search buffer")
"s S" '(consult-line-multi :which-key "Search all buffers")
;; Tabs / toggle
"t" '(:ignore t :which-key "tabs/toggle")

13
.config/emacs/site-lisp/dot-selection.el

@ -58,7 +58,18 @@
(elpaca-setup consult
(:load-after vertico)
(:when-loaded (setq consult-narrow-key (kbd "?"))))
(:when-loaded
(setq consult-narrow-key (kbd "?"))
(defun dot/consult-line-no-fuzzy ()
"Call consult-line without fuzzy matching."
(interactive)
(let ((prescient-filter-method (delete 'fuzzy (copy-tree prescient-filter-method))))
(consult-line)))
(consult-customize
dot/consult-line-no-fuzzy :prompt "Search: "
consult-line-multi :prompt "Search: " :initial nil)))
(elpaca-setup consult-flycheck
(:load-after consult flycheck))

Loading…
Cancel
Save