This commit is contained in:
Zelong Kuang
2025-12-22 18:39:07 +11:00
parent 30fcd61417
commit fd79078f49
2 changed files with 51 additions and 12 deletions

View File

@@ -118,26 +118,65 @@
:commands (consult-narrow-help) :commands (consult-narrow-help)
:functions (list-colors-duplicates consult-colors--web-list) :functions (list-colors-duplicates consult-colors--web-list)
:bind (("C-." . consult-imenu) :bind (("C-." . consult-imenu)
("C-c T" . consult-theme) ("C-c T" . consult-theme)
([remap Info-search] . consult-info) ([remap Info-search] . consult-info)
;; ([remap isearch-forward] . consult-line) ;; ([remap isearch-forward] . consult-line)
([remap recentf-open-files] . consult-recent-file) ([remap recentf-open-files] . consult-recent-file)
("s-f" . consult-line) ("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
("C-c s s" . consult-line)
("C-c p f" . consult-projectile) ;; Custom M-# bindings for fast register access
("C-x C-r" . consult-recent-file) ("M-#" . consult-register-load)
("C-x C-b" . consult-buffer) ("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
("C-c s p" . consult-ripgrep)) ("C-M-#" . consult-register)
;; Other custom bindings
("M-y" . consult-yank-pop) ;; orig. yank-pop
;; M-g bindings in `goto-map'
("M-g e" . consult-compile-error)
("M-g r" . consult-grep-match)
("M-s f" . consult-flycheck) ;; Alternative: consult-flycheck
("M-g g" . consult-goto-line) ;; orig. goto-line
("M-g M-g" . consult-goto-line) ;; orig. 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-imenu-multi)
;; M-s bindings in `search-map'
("s-f" . consult-line)
("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 L" . consult-line-multi)
("M-s k" . consult-keep-lines)
("M-s u" . consult-focus-lines)
("C-c p f" . consult-projectile)
("C-x C-r" . consult-recent-file)
("C-x C-b" . consult-buffer)
("M-s e" . consult-isearch-history)
:map isearch-mode-map
("M-e" . consult-isearch-history) ;; orig. isearch-edit-string
("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string
("M-s l" . consult-line) ;; needed by consult-line to detect isearch
("M-s L" . consult-line-multi))
:hook (completion-list-mode . consult-preview-at-point-mode) :hook (completion-list-mode . consult-preview-at-point-mode)
:init :init
(setq register-preview-delay 0.5 (setq register-preview-delay 0.5
register-preview-function #'consult-register-format)) register-preview-function #'consult-register-format)
(setq xref-show-xrefs-function #'consult-xref
xref-show-definitions-function #'consult-xref))
(use-package consult-projectile) (use-package consult-projectile)
(use-package consult-flycheck)
(use-package consult-dir (use-package consult-dir
:ensure t :ensure t
:bind (("C-x C-d" . consult-dir) :bind (("C-x C-d" . consult-dir)

View File

@@ -38,7 +38,7 @@
("h d" rainbow-delimiters-mode "delimiter" :toggle t) ("h d" rainbow-delimiters-mode "delimiter" :toggle t)
("h t" global-hl-todo-mode "todo" :toggle t)) ("h t" global-hl-todo-mode "todo" :toggle t))
"Program" "Program"
(("f" flymake-mode "flymake" :toggle t) (("f" global-flycheck-mode "flycheck" :toggle t)
("O" hs-minor-mode "hideshow" :toggle t) ("O" hs-minor-mode "hideshow" :toggle t)
("u" subword-mode "subword" :toggle t) ("u" subword-mode "subword" :toggle t)
("W" which-function-mode "which function" :toggle t) ("W" which-function-mode "which function" :toggle t)