feat(beancount): highlight custom directives

Doesn't seem to be done by beancount-mode, so...
This commit is contained in:
Henrik Lissner
2025-05-24 16:39:27 +02:00
parent 5026de65bb
commit 8406c1ff22

View File

@ -34,6 +34,14 @@ behavior).")
(setq beancount-electric-currency t)
;; Fontify custom directives.
;; REVIEW: PR this upstream.
(add-to-list 'beancount-font-lock-keywords
`(,(concat "^\\(" beancount-date-regexp "\\) +"
"\\(" (regexp-opt '("custom")) "\\) +")
(1 'beancount-date)
(2 'beancount-directive)))
(when (modulep! +lsp)
(add-hook 'beancount-mode-local-vars-hook #'lsp! 'append))