summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/inits/11-completion.el55
1 files changed, 29 insertions, 26 deletions
diff --git a/emacs/inits/11-completion.el b/emacs/inits/11-completion.el
index f9d0ed2..149a7b8 100644
--- a/emacs/inits/11-completion.el
+++ b/emacs/inits/11-completion.el
@@ -1,4 +1,4 @@
-;; Time-stamp: <2024-01-14 19h10 CET (068b8e3d)>
+;; Time-stamp: <2024-09-24 17h43 EDT (6e0a849e)>
(use-package savehist
:ensure t
@@ -54,15 +54,20 @@
(use-package consult
:ensure t
:bind (;; C-c bindings (mode-specific-map)
+ ("C-c M-x" . consult-mode-command)
("C-c h" . consult-history)
- ("C-c m" . consult-mode-command)
- ("C-c b" . consult-bookmark)
("C-c k" . consult-kmacro)
+ ("C-c m" . consult-man)
+ ("C-c i" . consult-info)
+ ([remap Info-search] . consult-info)
;; C-x bindings (ctl-x-map)
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
("C-x b" . consult-buffer) ;; orig. switch-to-buffer
("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame
+ ("C-x t b" . consult-buffer-other-tab) ;; orig. switch-to-buffer-other-tab
+ ("C-x r b" . consult-bookmark) ;; orig. bookmark-jump
+ ("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer
;; Custom M-# bindings for fast register access
("M-#" . consult-register-load)
("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
@@ -72,29 +77,25 @@
("<help> a" . consult-apropos) ;; orig. apropos-command
;; M-g bindings (goto-map)
("M-g e" . consult-compile-error)
- ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
("M-g M-g" . consult-goto-line) ;; orig. goto-line
+ ("M-g g" . consult-goto-line)
("M-g o" . consult-outline) ;; Alternative: consult-org-heading
("M-g m" . consult-mark)
("M-g k" . consult-global-mark)
("M-g i" . consult-imenu)
- ("M-g I" . consult-project-imenu)
+ ("M-g I" . consult-imenu-multi)
;; M-s bindings (search-map)
- ("M-s f" . consult-find)
- ("M-s L" . consult-locate)
- ("C-c g" . consult-ripgrep)
- ("C-c G" . consult-git-grep)
+ ("M-s d" . consult-find) ;; Alternative: consult-fd
+ ("M-s c" . consult-locate)
+ ("M-s g" . consult-grep)
+ ("M-s G" . consult-git-grep)
+ ("M-s r" . consult-ripgrep)
("M-s l" . consult-line)
- ("M-s m" . consult-multi-occur)
+ ("M-s L" . consult-line-multi)
("M-s k" . consult-keep-lines)
("M-s u" . consult-focus-lines)
- ;; Isearch integration
- ("M-s e" . consult-isearch)
- :map isearch-mode-map
- ("M-e" . consult-isearch) ;; orig. isearch-edit-string
- ("M-s e" . consult-isearch) ;; orig. isearch-edit-string
- ("M-s l" . consult-line)) ;; needed by consult-line to detect isearch
-
+ )
+ :hook (completion-list-mode . consult-preview-at-point-mode)
:init
;; Optionally configure the register formatting. This improves the register
;; preview for `consult-register', `consult-register-load',
@@ -124,20 +125,22 @@
(define-key map "\C-s" #'previous-history-or-next)
map))
- (consult-customize consult-line :keymap my-consult-line-map)
+ (consult-customize consult-line :keymap my-consult-line-map
+ consult-ripgrep
+ consult-git-grep
+ consult-grep
+ consult-bookmark
+ consult-recent-file
+ consult-xref
+ consult--source-bookmark
+ consult--source-file-register
+ consult--source-recent-file
+ consult--source-project-recent-file)
;; Optionally configure the narrowing key.
;; Both < and C-+ work reasonably well.
(setq consult-narrow-key "<") ;; (kbd "C-+")
- ;; Optionally make narrowing help available in the minibuffer.
- ;; You may want to use `embark-prefix-help-command' or which-key instead.
- ;; (define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help)
-
- ;; Projectile integration
- (autoload 'projectile-project-root "projectile")
- (setq consult-project-function #'projectile-project-root)
-
(setq consult-buffer-sources '(consult--source-hidden-buffer
consult--source-modified-buffer
consult--source-buffer