Use consult-imenu-config to enable better jumps in Clojure

This commit is contained in:
Vedang Manerikar 2024-12-16 07:30:09 +05:30
parent 06538c9ccb
commit c82e2e1550
2 changed files with 24 additions and 8 deletions

View file

@ -2213,10 +2213,18 @@ Also check: [[#h:e0f9c30e-3a98-4479-b709-7008277749e4][The =unravel-search.el= m
"-path */.git* -prune "
"-or -path */.cache* -prune )"))
(setq consult-preview-key 'any)
(add-to-list 'consult-mode-histories '(vc-git-log-edit-mode . log-edit-comment-ring))
;; the `imenu' extension is in its own file
(require 'consult-imenu))
;; the `imenu' extension is in its own file
(require 'consult-imenu)
(dolist (clj '(clojure-mode clojure-ts-mode))
(add-to-list 'consult-imenu-config
`(,clj :toplevel "Functions"
:types
((?f "Functions" font-lock-function-name-face)
(?m "Macros" font-lock-function-name-face)
(?p "Packages" font-lock-constant-face)
(?t "Types" font-lock-type-face)
(?v "Variables" font-lock-variable-name-face)))))
(add-to-list 'consult-mode-histories '(vc-git-log-edit-mode . log-edit-comment-ring)))
#+end_src
** The =unravel-completion.el= section about ~embark~

View file

@ -274,10 +274,18 @@
"-path */.git* -prune "
"-or -path */.cache* -prune )"))
(setq consult-preview-key 'any)
(add-to-list 'consult-mode-histories '(vc-git-log-edit-mode . log-edit-comment-ring))
;; the `imenu' extension is in its own file
(require 'consult-imenu))
;; the `imenu' extension is in its own file
(require 'consult-imenu)
(dolist (clj '(clojure-mode clojure-ts-mode))
(add-to-list 'consult-imenu-config
`(,clj :toplevel "Functions"
:types
((?f "Functions" font-lock-function-name-face)
(?m "Macros" font-lock-function-name-face)
(?p "Packages" font-lock-constant-face)
(?t "Types" font-lock-type-face)
(?v "Variables" font-lock-variable-name-face)))))
(add-to-list 'consult-mode-histories '(vc-git-log-edit-mode . log-edit-comment-ring)))
;;; Extended minibuffer actions and more (embark.el and prot-embark.el)
(use-package embark