Fontify autodef/if cookies & *! symbols in elisp
This commit is contained in:
parent
421d00f085
commit
0020631b2e
1 changed files with 4 additions and 2 deletions
|
@ -29,10 +29,12 @@
|
||||||
(defun +emacs-lisp|extra-fontification ()
|
(defun +emacs-lisp|extra-fontification ()
|
||||||
"Display lambda as a smybol and fontify doom module functions."
|
"Display lambda as a smybol and fontify doom module functions."
|
||||||
(font-lock-add-keywords
|
(font-lock-add-keywords
|
||||||
nil `(;; Display "lambda" as λ
|
nil `(;; Highlight custom Doom cookies
|
||||||
|
("^;;;###\\(autodef\\|if\\)[ \n]" (1 font-lock-warning-face t))
|
||||||
|
;; Display "lambda" as λ
|
||||||
("(\\(lambda\\)" (1 (ignore (compose-region (match-beginning 1) (match-end 1) ?λ #'decompose-region))))
|
("(\\(lambda\\)" (1 (ignore (compose-region (match-beginning 1) (match-end 1) ?λ #'decompose-region))))
|
||||||
;; Highlight doom/module functions
|
;; Highlight doom/module functions
|
||||||
("\\(^\\|\\s-\\|,\\)(\\(\\(doom\\|\\+\\)[^) ]+\\)[) \n]" (2 font-lock-keyword-face)))))
|
("\\(^\\|\\s-\\|,\\)(\\(\\(doom\\|\\+\\)[^) ]+\\|[^) ]+!\\)[) \n]" (2 font-lock-keyword-face)))))
|
||||||
|
|
||||||
(defun +emacs-lisp|init-imenu ()
|
(defun +emacs-lisp|init-imenu ()
|
||||||
"Improve imenu support with better expression regexps and Doom-specific forms."
|
"Improve imenu support with better expression regexps and Doom-specific forms."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue