doomemacs/modules/lang/beancount/config.el
Ellis Kenyő 9787022b83
refactor!: replace all-the-icons with nerd-icons
BREAKING CHANGE: This commit replaces all-the-icons with nerd-fonts. Any
all-the-icons-* function calls or variable references in your private
config will break and should be replaced with their nerd-icons-*
equivalent. That said, Doom will continue to install all-the-icons for
a while, so feel free to load it if you don't want to fully commit to
the change yet.

This change is happening because nerd-icon has wider support for GUI and
TUI Emacs; has a larger, more consistent selection of symbols; plus unicode
coverage.

Fix: #7368
Close: #6675
Close: #7364
2023-09-14 01:03:55 +02:00

36 lines
1.3 KiB
EmacsLisp

;;; lang/beancount/config.el -*- lexical-binding: t; -*-
(use-package! beancount
:mode ("\\.beancount\\'" . beancount-mode)
:hook (beancount-mode . outline-minor-mode)
:init
(after! nerd-icons
(add-to-list 'nerd-icons-extension-icon-alist
'("beancount" nerd-icons-faicon "nf-fa-money" :face nerd-icons-lblue))
(add-to-list 'nerd-icons-mode-icon-alist
'(beancount-mode nerd-icons-faicon "nf-fa-money" :face nerd-icons-lblue)))
:config
(setq beancount-electric-currency t)
(when (modulep! +lsp)
(add-hook 'beancount-mode-local-vars-hook #'lsp! 'append))
(map! :map beancount-mode-map
"TAB" (cmds! (and outline-minor-mode (outline-on-heading-p))
#'beancount-outline-cycle
#'indent-according-to-mode)
:m "[[" #'+beancount/previous-transaction
:m "]]" #'+beancount/next-transaction
:localleader
"b" #'+beancount/balance
"c" #'beancount-check
"l" #'beancount-linked
"q" #'beancount-query
"x" #'beancount-context
(:prefix ("i" . "insert")
"c" #'+beancount/clone-transaction
"C" #'+beancount/clone-this-transaction
"a" #'beancount-insert-account
"p" #'beancount-insert-prices
"d" #'beancount-insert-date)))