BREAKING CHANGE: If `beancount-electric-currency` is non-nil, the currency is appended to transactions, falling back to the ledger's "operating_currency" option, even in cases where a currency was not explicitly needed (e.g. only one currency specified for an account). After receiving input from beancount-mode's author, I reconsidered its utility and decided to remove it. Ref beancount/beancount-mode#19
33 lines
1.2 KiB
EmacsLisp
33 lines
1.2 KiB
EmacsLisp
;;; lang/beancount/config.el -*- lexical-binding: t; -*-
|
|
|
|
(use-package! beancount
|
|
:mode ("\\.beancount\\'" . beancount-mode)
|
|
:hook (beancount-mode . outline-minor-mode)
|
|
:init
|
|
;; REVIEW Remove once domtronn/all-the-icons.el#272 is merged
|
|
(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
|
|
(setq beancount-electric-currency t)
|
|
|
|
(when (featurep! +lsp)
|
|
(add-hook 'beancount-mode-local-vars-hook #'lsp!))
|
|
|
|
(map! :map beancount-mode-map
|
|
"TAB" (cmds! (and outline-minor-mode (outline-on-heading-p))
|
|
#'beancount-outline-cycle
|
|
#'indent-according-to-mode)
|
|
: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)))
|