mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
lang/sh: recognize functions w/ dashes in imenu
This commit is contained in:
@ -24,6 +24,11 @@
|
||||
|
||||
(setq sh-indent-after-continuation 'always)
|
||||
|
||||
;; recognize function names with dashes in them
|
||||
(push '((sh . ((nil "^\\s-*function\\s-+\\([[:alpha:]_-][[:alnum:]_-]*\\)\\s-*\\(?:()\\)?" 1)
|
||||
(nil "^\\s-*\\([[:alpha:]_-][[:alnum:]_-]*\\)\\s-*()" 1))))
|
||||
sh-imenu-generic-expression)
|
||||
|
||||
;; 1. Fontifies variables in double quotes
|
||||
;; 2. Fontify command substitution in double quotes
|
||||
;; 3. Fontify built-in/common commands (see `+sh-builtin-keywords')
|
||||
|
Reference in New Issue
Block a user