elisp: Add imenu support for evil operators/commands
This commit is contained in:
parent
98578d19fd
commit
8129a7eb55
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue