ThoomEmacs update

- Indent with spaces
- Single space after period for sentences
- Remove thoom/repeat-map macro
- Add SPC f r binding for consult-recent-file
- Add g d and g u bindings for meow
- add q binding for meow to cancel selection
- add dumb-jump
- add ttm-org-clear-all function
This commit is contained in:
2022-11-01 16:34:22 -07:00
parent 949214603f
commit cbf725d16f
2 changed files with 251 additions and 232 deletions

View File

@@ -10,9 +10,9 @@
(bootstrap-version 6))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
@@ -35,8 +35,8 @@ Emacs on macOS doesn't naturally find shell variables like PATH, so to help it o
:if (and ON-MAC (memq window-system '(mac ns)))
:config
(dolist (var '("NIX_SSL_CERT_FILE"
"NIX_PATH"
"NIX_PROFILES"))
"NIX_PATH"
"NIX_PROFILES"))
(add-to-list 'exec-path-from-shell-variables var))
(exec-path-from-shell-initialize))
#+end_src
@@ -44,7 +44,7 @@ Emacs on macOS doesn't naturally find shell variables like PATH, so to help it o
#+begin_src emacs-lisp
(defun thoom/org-babel-tangle-config ()
(when (string-equal (file-truename (buffer-file-name))
(expand-file-name "~/.dotfiles/thoom-emacs/ThoomEmacs.org"))
(expand-file-name "~/.dotfiles/thoom-emacs/ThoomEmacs.org"))
;; Dynamic scoping to the rescue
(let ((org-confirm-babel-evaluate nil))
(org-babel-tangle))))
@@ -59,7 +59,7 @@ Emacs on macOS doesn't naturally find shell variables like PATH, so to help it o
:config
;; Global settings (defaults)
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
(load-theme 'doom-one t)
;; Enable flashing mode-line on errors
@@ -112,6 +112,7 @@ Set some common settings, like global-auto-revert-mode.
;; tabs are for monsters
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq-default sentence-end-double-space nil)
#+END_SRC
** hl-todo
#+begin_src emacs-lisp
@@ -121,24 +122,10 @@ Set some common settings, like global-auto-revert-mode.
(global-hl-todo-mode))
#+end_src
** Repeat Mode
Repeat-mode just needs to be enabled. Keymaps are defined through use-package's ~:repeat-map~ directive.
#+begin_src emacs-lisp
(repeat-mode 1)
(defmacro thoom/repeat-map (keymap-sym &rest bindings)
"A helper macro for defining repeat maps. keymap-sym is a symbol to name the keymap with.
bindings are a sequence of cons cells containing a string to be passed to kbd and a function
for that key to be mapped to."
(declare (indent 1))
`(progn
(defvar ,keymap-sym
(let ((map (make-sparse-keymap)))
,@(mapcar (lambda (binding) `(define-key map (kbd ,(car binding)) ',(cdr binding))) bindings)
map))
(map-keymap
(lambda (_key cmd)
(when (symbolp cmd)
(put cmd 'repeat-map ',keymap-sym)))
,keymap-sym)))
#+end_src
** Tab Bar
@@ -203,6 +190,7 @@ Set a location for the custom file so it doesn't pollute this file.
;; File management
("C-c f f" . find-file)
("C-c f r" . consult-recent-file)
("C-c f j" . dired-jump)
;; TODO - C-c g p for open project in magit
@@ -250,24 +238,24 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
;; TODO - debug this. should make org headings into meow things
(meow-thing-register 'heading 'heading 'heading)
(setq meow-use-clipboard t
meow-char-thing-table '((?\( . round)
(?\) . round)
(?\[ . square)
(?\] . square)
(?\{ . curly)
(?\} . curly)
(?\" . string)
(?\' . string)
(?h . heading)
(?e . symbol)
(?w . window)
(?b . buffer)
(?p . paragraph)
(?l . line)
(?d . defun)
(?. . sentence))
meow-cheatsheet-layout meow-cheatsheet-layout-qwerty
meow-keypad-self-insert-undefined nil)
meow-char-thing-table '((?\( . round)
(?\) . round)
(?\[ . square)
(?\] . square)
(?\{ . curly)
(?\} . curly)
(?\" . string)
(?\' . string)
(?h . heading)
(?e . symbol)
(?w . window)
(?b . buffer)
(?p . paragraph)
(?l . line)
(?d . defun)
(?. . sentence))
meow-cheatsheet-layout meow-cheatsheet-layout-qwerty
meow-keypad-self-insert-undefined nil)
(add-to-list 'meow-mode-state-list '(eshell-mode . insert) t)
(add-hook 'git-commit-mode-hook 'meow-insert)
@@ -321,6 +309,7 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
'("." . meow-bounds-of-thing)
'("[" . meow-beginning-of-thing)
'("]" . meow-end-of-thing)
;; Potential addition <, >
'("a" . meow-append)
'("A" . meow-open-below)
@@ -334,7 +323,9 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
'("E" . meow-next-symbol)
'("f" . meow-find)
`("F" . ,(thoom/meow-negate 'meow-find))
'("g" . meow-cancel-selection)
'("g g" . meow-cancel-selection)
'("g d" . xref-find-definitions)
'("g u" . xref-find-references)
'("G" . meow-grab)
'("h" . meow-left)
'("H" . meow-left-expand)
@@ -354,7 +345,7 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
'("O" . meow-to-block)
'("p" . meow-yank)
'("P" . consult-yank-pop)
;; Potential addition - q
'("q" . meow-cancel-selection)
;; Potential addition - Q
'("r" . meow-replace)
'("R" . meow-swap-grab)
@@ -414,28 +405,50 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
:init
(setq tab-always-indent 'complete))
#+end_src
** Dumb-Jump
#+begin_src emacs-lisp
(use-package dumb-jump
:straight t
:config
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
(setq xref-show-definitions-function #'xref-show-definitions-completing-read))
#+end_src
* Org
#+begin_src emacs-lisp
(use-package org
:hook (org-mode . visual-line-mode)
:bind (:map
org-mode-map
("C-x C-o c" . thoom-org-clear-all)
:repeat-map
thoom/org-previous-next-visible-heading-repeat-map
("n" . org-next-visible-heading)
("C-n" . org-next-visible-heading)
("p" . org-previous-visible-heading)
("C-p" . org-previous-visible-heading))
:config
;; Add structure templates
(add-to-list 'org-modules 'org-tempo t)
(add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
(setq org-edit-src-content-indentation 0)
;; Repeat map for previous/next heading
(thoom/repeat-map thoom/org-previous-next-visible-heading-repeat-map
("n" . org-next-visible-heading)
("C-n" . org-next-visible-heading)
("p" . org-previous-visible-heading)
("C-p" . org-previous-visible-heading)))
(setq org-edit-src-content-indentation 0))
(use-package org-bullets
:straight t
:hook org-mode)
#+end_src
** Groceries
#+begin_src emacs-lisp
(defun thoom-org-clear-all ()
(interactive)
(goto-char 0)
(org-map-entries
(lambda ()
(org-todo "")))
(flush-lines "CLOSED")
(message "Entries cleared."))
#+end_src
* VMOCE
** Vertico
@@ -446,14 +459,14 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
(vertico-mode)
:bind (:map vertico-map
("C-j" . vertico-next)
("C-k" . vertico-previous)))
("C-j" . vertico-next)
("C-k" . vertico-previous)))
(use-package vertico-directory
:after vertico
:bind (:map vertico-map
("C-h" . vertico-directory-delete-word)
("C-l" . vertico-directory-enter)))
("C-h" . vertico-directory-delete-word)
("C-l" . vertico-directory-enter)))
#+end_src
** Marginalia
#+begin_src emacs-lisp
@@ -461,7 +474,7 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
:straight t
;; Either bind `marginalia-cycle' globally or only in the minibuffer
:bind (:map minibuffer-local-map
("M-A" . marginalia-cycle))
("M-A" . marginalia-cycle))
:init
(marginalia-mode))
@@ -475,8 +488,8 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
;; (setq orderless-style-dispatchers '(+orderless-dispatch)
;; orderless-component-separator #'orderless-escapable-split-on-space)
(setq completion-styles '(orderless basic)
completion-category-defaults nil
completion-category-overrides '((file (styles partial-completion)))))
completion-category-defaults nil
completion-category-overrides '((file (styles partial-completion)))))
#+end_src
** Consult
#+begin_src emacs-lisp
@@ -484,56 +497,56 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
:straight t
;; Replace bindings. Lazily loaded due by `use-package'.
:bind (;; C-c bindings (mode-specific-map)
("C-c h" . consult-history)
("C-c m" . consult-mode-command)
("C-c k" . consult-kmacro)
;; C-x bindings (ctl-x-map)
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
("C-x C-b" . consult-buffer)
("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 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)
("C-M-#" . consult-register)
;; Other custom bindings
("M-y" . consult-yank-pop) ;; orig. yank-pop
("<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 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 (search-map)
("M-s d" . consult-find)
("M-s D" . 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 m" . consult-multi-occur)
("M-s k" . consult-keep-lines)
("M-s u" . consult-focus-lines)
;; Isearch integration
("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) ;; needed by consult-line to detect isearch
;; Minibuffer history
:map minibuffer-local-map
("M-s" . consult-history) ;; orig. next-matching-history-element
("M-r" . consult-history)) ;; orig. previous-matching-history-element
("C-c h" . consult-history)
("C-c m" . consult-mode-command)
("C-c k" . consult-kmacro)
;; C-x bindings (ctl-x-map)
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
("C-x C-b" . consult-buffer)
("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 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)
("C-M-#" . consult-register)
;; Other custom bindings
("M-y" . consult-yank-pop) ;; orig. yank-pop
("<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 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 (search-map)
("M-s d" . consult-find)
("M-s D" . 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 m" . consult-multi-occur)
("M-s k" . consult-keep-lines)
("M-s u" . consult-focus-lines)
;; Isearch integration
("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) ;; needed by consult-line to detect isearch
;; Minibuffer history
:map minibuffer-local-map
("M-s" . consult-history) ;; orig. next-matching-history-element
("M-r" . consult-history)) ;; orig. previous-matching-history-element
;; Enable automatic preview at point in the *Completions* buffer. This is
;; relevant when you use the default completion UI.
@@ -546,7 +559,7 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
;; preview for `consult-register', `consult-register-load',
;; `consult-register-store' and the Emacs built-ins.
(setq register-preview-delay 0.5
register-preview-function #'consult-register-format)
register-preview-function #'consult-register-format)
;; Optionally tweak the register preview window.
;; This adds thin lines, sorting and hides the mode line of the window.
@@ -554,7 +567,7 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
;; Use Consult to select xref locations with preview
(setq xref-show-xrefs-function #'consult-xref
xref-show-definitions-function #'consult-xref)
xref-show-definitions-function #'consult-xref)
;; Configure other variables and modes in the :config section,
;; after lazily loading the package.
@@ -615,9 +628,9 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
:config
;; Hide the mode line of the Embark live/completions buffers
(add-to-list 'display-buffer-alist
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
nil
(window-parameters (mode-line-format . none)))))
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
nil
(window-parameters (mode-line-format . none)))))
;; Consult users will also want the embark-consult package.
(use-package embark-consult
@@ -636,9 +649,9 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
:straight t
:custom (magit-save-repository-buffers 'dontask)
:bind (("C-x g" . magit-status)
:map magit-mode-map
(":" . execute-extended-command)
("x" . magit-discard)))
:map magit-mode-map
(":" . execute-extended-command)
("x" . magit-discard)))
#+end_src
* Direnv
#+begin_src emacs-lisp

View File

@@ -4,9 +4,9 @@
(bootstrap-version 6))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
@@ -24,14 +24,14 @@
:if (and ON-MAC (memq window-system '(mac ns)))
:config
(dolist (var '("NIX_SSL_CERT_FILE"
"NIX_PATH"
"NIX_PROFILES"))
"NIX_PATH"
"NIX_PROFILES"))
(add-to-list 'exec-path-from-shell-variables var))
(exec-path-from-shell-initialize))
(defun thoom/org-babel-tangle-config ()
(when (string-equal (file-truename (buffer-file-name))
(expand-file-name "~/.dotfiles/thoom-emacs/ThoomEmacs.org"))
(expand-file-name "~/.dotfiles/thoom-emacs/ThoomEmacs.org"))
;; Dynamic scoping to the rescue
(let ((org-confirm-babel-evaluate nil))
(org-babel-tangle))))
@@ -43,7 +43,7 @@
:config
;; Global settings (defaults)
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
(load-theme 'doom-one t)
;; Enable flashing mode-line on errors
@@ -85,6 +85,7 @@
;; tabs are for monsters
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq-default sentence-end-double-space nil)
(use-package hl-todo
:straight t
@@ -93,22 +94,6 @@
(repeat-mode 1)
(defmacro thoom/repeat-map (keymap-sym &rest bindings)
"A helper macro for defining repeat maps. keymap-sym is a symbol to name the keymap with.
bindings are a sequence of cons cells containing a string to be passed to kbd and a function
for that key to be mapped to."
(declare (indent 1))
`(progn
(defvar ,keymap-sym
(let ((map (make-sparse-keymap)))
,@(mapcar (lambda (binding) `(define-key map (kbd ,(car binding)) ',(cdr binding))) bindings)
map))
(map-keymap
(lambda (_key cmd)
(when (symbolp cmd)
(put cmd 'repeat-map ',keymap-sym)))
,keymap-sym)))
(tab-bar-mode)
;; TODO - keybindings
@@ -157,6 +142,7 @@
;; File management
("C-c f f" . find-file)
("C-c f r" . consult-recent-file)
("C-c f j" . dired-jump)
;; TODO - C-c g p for open project in magit
@@ -194,24 +180,24 @@
;; TODO - debug this. should make org headings into meow things
(meow-thing-register 'heading 'heading 'heading)
(setq meow-use-clipboard t
meow-char-thing-table '((?\( . round)
(?\) . round)
(?\[ . square)
(?\] . square)
(?\{ . curly)
(?\} . curly)
(?\" . string)
(?\' . string)
(?h . heading)
(?e . symbol)
(?w . window)
(?b . buffer)
(?p . paragraph)
(?l . line)
(?d . defun)
(?. . sentence))
meow-cheatsheet-layout meow-cheatsheet-layout-qwerty
meow-keypad-self-insert-undefined nil)
meow-char-thing-table '((?\( . round)
(?\) . round)
(?\[ . square)
(?\] . square)
(?\{ . curly)
(?\} . curly)
(?\" . string)
(?\' . string)
(?h . heading)
(?e . symbol)
(?w . window)
(?b . buffer)
(?p . paragraph)
(?l . line)
(?d . defun)
(?. . sentence))
meow-cheatsheet-layout meow-cheatsheet-layout-qwerty
meow-keypad-self-insert-undefined nil)
(add-to-list 'meow-mode-state-list '(eshell-mode . insert) t)
(add-hook 'git-commit-mode-hook 'meow-insert)
@@ -265,6 +251,7 @@
'("." . meow-bounds-of-thing)
'("[" . meow-beginning-of-thing)
'("]" . meow-end-of-thing)
;; Potential addition <, >
'("a" . meow-append)
'("A" . meow-open-below)
@@ -278,7 +265,9 @@
'("E" . meow-next-symbol)
'("f" . meow-find)
`("F" . ,(thoom/meow-negate 'meow-find))
'("g" . meow-cancel-selection)
'("g g" . meow-cancel-selection)
'("g d" . xref-find-definitions)
'("g u" . xref-find-references)
'("G" . meow-grab)
'("h" . meow-left)
'("H" . meow-left-expand)
@@ -298,7 +287,7 @@
'("O" . meow-to-block)
'("p" . meow-yank)
'("P" . consult-yank-pop)
;; Potential addition - q
'("q" . meow-cancel-selection)
;; Potential addition - Q
'("r" . meow-replace)
'("R" . meow-swap-grab)
@@ -356,46 +345,63 @@
:init
(setq tab-always-indent 'complete))
(use-package dumb-jump
:straight t
:config
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
(setq xref-show-definitions-function #'xref-show-definitions-completing-read))
(use-package org
:hook (org-mode . visual-line-mode)
:bind (:map
org-mode-map
("C-x C-o c" . thoom-org-clear-all)
:repeat-map
thoom/org-previous-next-visible-heading-repeat-map
("n" . org-next-visible-heading)
("C-n" . org-next-visible-heading)
("p" . org-previous-visible-heading)
("C-p" . org-previous-visible-heading))
:config
;; Add structure templates
(add-to-list 'org-modules 'org-tempo t)
(add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
(setq org-edit-src-content-indentation 0)
;; Repeat map for previous/next heading
(thoom/repeat-map thoom/org-previous-next-visible-heading-repeat-map
("n" . org-next-visible-heading)
("C-n" . org-next-visible-heading)
("p" . org-previous-visible-heading)
("C-p" . org-previous-visible-heading)))
(setq org-edit-src-content-indentation 0))
(use-package org-bullets
:straight t
:hook org-mode)
(defun thoom-org-clear-all ()
(interactive)
(goto-char 0)
(org-map-entries
(lambda ()
(org-todo "")))
(flush-lines "CLOSED")
(message "Entries cleared."))
(use-package vertico
:straight (:files (:defaults "extensions/*"))
:init
(vertico-mode)
:bind (:map vertico-map
("C-j" . vertico-next)
("C-k" . vertico-previous)))
("C-j" . vertico-next)
("C-k" . vertico-previous)))
(use-package vertico-directory
:after vertico
:bind (:map vertico-map
("C-h" . vertico-directory-delete-word)
("C-l" . vertico-directory-enter)))
("C-h" . vertico-directory-delete-word)
("C-l" . vertico-directory-enter)))
(use-package marginalia
:straight t
;; Either bind `marginalia-cycle' globally or only in the minibuffer
:bind (:map minibuffer-local-map
("M-A" . marginalia-cycle))
("M-A" . marginalia-cycle))
:init
(marginalia-mode))
@@ -407,63 +413,63 @@
;; (setq orderless-style-dispatchers '(+orderless-dispatch)
;; orderless-component-separator #'orderless-escapable-split-on-space)
(setq completion-styles '(orderless basic)
completion-category-defaults nil
completion-category-overrides '((file (styles partial-completion)))))
completion-category-defaults nil
completion-category-overrides '((file (styles partial-completion)))))
(use-package consult
:straight t
;; Replace bindings. Lazily loaded due by `use-package'.
:bind (;; C-c bindings (mode-specific-map)
("C-c h" . consult-history)
("C-c m" . consult-mode-command)
("C-c k" . consult-kmacro)
;; C-x bindings (ctl-x-map)
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
("C-x C-b" . consult-buffer)
("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 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)
("C-M-#" . consult-register)
;; Other custom bindings
("M-y" . consult-yank-pop) ;; orig. yank-pop
("<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 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 (search-map)
("M-s d" . consult-find)
("M-s D" . 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 m" . consult-multi-occur)
("M-s k" . consult-keep-lines)
("M-s u" . consult-focus-lines)
;; Isearch integration
("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) ;; needed by consult-line to detect isearch
;; Minibuffer history
:map minibuffer-local-map
("M-s" . consult-history) ;; orig. next-matching-history-element
("M-r" . consult-history)) ;; orig. previous-matching-history-element
("C-c h" . consult-history)
("C-c m" . consult-mode-command)
("C-c k" . consult-kmacro)
;; C-x bindings (ctl-x-map)
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
("C-x C-b" . consult-buffer)
("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 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)
("C-M-#" . consult-register)
;; Other custom bindings
("M-y" . consult-yank-pop) ;; orig. yank-pop
("<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 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 (search-map)
("M-s d" . consult-find)
("M-s D" . 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 m" . consult-multi-occur)
("M-s k" . consult-keep-lines)
("M-s u" . consult-focus-lines)
;; Isearch integration
("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) ;; needed by consult-line to detect isearch
;; Minibuffer history
:map minibuffer-local-map
("M-s" . consult-history) ;; orig. next-matching-history-element
("M-r" . consult-history)) ;; orig. previous-matching-history-element
;; Enable automatic preview at point in the *Completions* buffer. This is
;; relevant when you use the default completion UI.
@@ -476,7 +482,7 @@
;; preview for `consult-register', `consult-register-load',
;; `consult-register-store' and the Emacs built-ins.
(setq register-preview-delay 0.5
register-preview-function #'consult-register-format)
register-preview-function #'consult-register-format)
;; Optionally tweak the register preview window.
;; This adds thin lines, sorting and hides the mode line of the window.
@@ -484,7 +490,7 @@
;; Use Consult to select xref locations with preview
(setq xref-show-xrefs-function #'consult-xref
xref-show-definitions-function #'consult-xref)
xref-show-definitions-function #'consult-xref)
;; Configure other variables and modes in the :config section,
;; after lazily loading the package.
@@ -543,9 +549,9 @@
:config
;; Hide the mode line of the Embark live/completions buffers
(add-to-list 'display-buffer-alist
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
nil
(window-parameters (mode-line-format . none)))))
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
nil
(window-parameters (mode-line-format . none)))))
;; Consult users will also want the embark-consult package.
(use-package embark-consult
@@ -561,9 +567,9 @@
:straight t
:custom (magit-save-repository-buffers 'dontask)
:bind (("C-x g" . magit-status)
:map magit-mode-map
(":" . execute-extended-command)
("x" . magit-discard)))
:map magit-mode-map
(":" . execute-extended-command)
("x" . magit-discard)))
(use-package direnv
:straight t