mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
elisp: Add imenu support for evil operators/commands
This commit is contained in:
@ -24,6 +24,10 @@
|
||||
(add-hook 'after-save-hook 'narf-elisp-auto-compile nil t)
|
||||
|
||||
(let ((header-face 'font-lock-constant-face))
|
||||
(add-to-list 'imenu-generic-expression
|
||||
`("Evil Command" "\\(^\\s-*(evil-define-command +\\)\\(\\_<.+\\_>\\)" 2))
|
||||
(add-to-list 'imenu-generic-expression
|
||||
`("Evil Operator" "\\(^\\s-*(evil-define-operator +\\)\\(\\_<.+\\_>\\)" 2))
|
||||
(add-to-list 'imenu-generic-expression
|
||||
`("Package" "\\(^\\s-*(use-package +\\)\\(\\_<.+\\_>\\)" 2))
|
||||
(add-to-list 'imenu-generic-expression
|
||||
@ -41,7 +45,8 @@
|
||||
(propertize
|
||||
x 'face (cond ((string= x "Variables")
|
||||
'font-lock-variable-name-face)
|
||||
((string= x "Function")
|
||||
((or (string= x "Function")
|
||||
(string-prefix-p "Evil " x t))
|
||||
'font-lock-function-name-face)
|
||||
((string= x "Types")
|
||||
'font-lock-type-face)
|
||||
|
Reference in New Issue
Block a user