From 7060f607c3e5ee3682b345ba03c668378d3c2a81 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Thu, 18 May 2023 10:41:35 +0200 Subject: [PATCH] try consult + consult-grep --- init.el | 2 +- lisp/init-smarter-than-emacs.el | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index 4fa0b90..43a01ab 100644 --- a/init.el +++ b/init.el @@ -103,7 +103,7 @@ (require 'init-dumpjump) (require 'init-smartparens) -(require 'init-grep) +;; (require 'init-grep) => see consult in smarter (require 'init-dictcc) ;; programming and text modes diff --git a/lisp/init-smarter-than-emacs.el b/lisp/init-smarter-than-emacs.el index e8094c1..1f3e45a 100644 --- a/lisp/init-smarter-than-emacs.el +++ b/lisp/init-smarter-than-emacs.el @@ -87,9 +87,27 @@ via [[http://whattheemacsd.com/setup-ido.el-02.html][whattheemacs.d]]" (window-parameters (mode-line-format . none))))) +(use-package consult + ;; Replace bindings. Lazily loaded due by `use-package'. + :bind (;; C-c bindings in `mode-specific-map' + ("C-x b" . consult-buffer)) + + ;; Enable automatic preview at point in the *Completions* buffer. This is + ;; relevant when you use the default completion UI. + :hook (completion-list-mode . consult-preview-at-point-mode) + + :custom + ;; FIXME: does not ignore .git etc, try ripgrep or ag + (consult-grep-args "grep --null --line-buffered --color=never --ignore-case\ + --with-filename --line-number -I -r -A1 -B1") + + :config + (defalias 'egrep 'consult-grep)) - +(use-package + embark-consult + :after (embark consult)) ;; test, replace isearch-forward-regexp first only.