Skip to content

Instantly share code, notes, and snippets.

@fredRos fredRos/.emacs
Last active Apr 25, 2017

What would you like to do?
Syntax highlighting of doxygen-style markdown in emacs
;; After a part is matched, it is no longer modified
;; => put catch-all patterns last
(font-lock-add-keywords 'markdown-mode
;; mark each of three groups differently
;; @section label title
'(("^\\(@section\\) \\(.+?\\) \\(.+?\\)$"
(1 font-lock-constant-face)
(2 font-lock-comment-face)
(3 font-lock-builtin-face))
;; @ref label
(1 font-lock-constant-face)
(2 font-lock-comment-face))
;; `@' not treated as part of symbol but look for next symbol end after `@'
("@.+?\\_>" . font-lock-constant-face)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.