Add :lang beancount module

This commit is contained in:
Henrik Lissner 2021-04-13 20:09:08 -04:00
parent 2d140a7a80
commit 8a083d1370
6 changed files with 219 additions and 1 deletions

View file

@ -0,0 +1,29 @@
;;; lang/beancount/config.el -*- lexical-binding: t; -*-
(use-package! beancount-mode
:mode "\\.beancount\\'"
:init
(add-hook 'beancount-mode-hook #'outline-minor-mode)
(after! all-the-icons
(add-to-list 'all-the-icons-icon-alist
'("\\.beancount\\'" all-the-icons-material "attach_money" :face all-the-icons-lblue))
(add-to-list 'all-the-icons-mode-icon-alist
'(beancount-mode all-the-icons-material "attach_money" :face all-the-icons-lblue)))
:config
(when (featurep! +lsp)
(add-hook 'beancount-mode-local-vars-hook #'lsp!))
(setq beancount-electric-currency t)
(map! :map beancount-mode-map
:localleader
"b" #'+beancount/balance
"c" #'beancount-check
"l" #'beancount-linked
"q" #'beancount-query
"x" #'beancount-context
(:prefix ("i" . "insert")
"a" #'beancount-insert-account
"p" #'beancount-insert-prices
"d" #'beancount-insert-date)))