feat(emacs): Remap Imenu commands to consult-org-heading

This commit is contained in:
Madeleine Sydney
2025-02-21 21:14:41 -07:00
parent 8218ae47ef
commit d46c80b03b

View File

@@ -382,6 +382,14 @@ See https://lists.gnu.org/archive/html/emacs-orgmode/2019-07/msg00081.html."
(general-def
:prefix-map 'syd-leader-notes-map
"r" `("Org-roam" . ,syd-leader-notes-roam-map))
;; Rebind Imenu keybind to `consult-org-heading'. It's similar enough in
;; appearance and functionality, but more reliable and "correct."
;; REVIEW: Perhaps it would be best to implement `imenu-create-index-function'
;; using `consult-org-heading'?
(general-def
:keymaps 'org-mode-map
[remap consult-imenu] #'consult-org-heading
[remap imenu] #'consult-org-heading)
(general-define-key
:keymaps 'org-mode-map
:states '(normal visual motion emacs insert)