From e584d855e7ccd3fa7261ba019b80be217b8c92f2 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 2 Jan 2021 10:04:06 -0600 Subject: Add beancount-mode --- config.org | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/config.org b/config.org index a0a354c..2ee82e4 100644 --- a/config.org +++ b/config.org @@ -1251,6 +1251,27 @@ exist after each headings's drawers." (define-key acdw/map "g" #'magit-status) #+end_src +** Beancount mode + +#+begin_src emacs-lisp + (straight-use-package '(beancount-mode + :host github + :repo "beancount/beancount-mode")) + (require 'beancount) + + (add-to-list 'auto-mode-alist '("\\.beancount\\'" . beancount-mode)) + + (defun acdw/disable-aggressive-indent () + "Turn `aggressive-indent-mode' off for a buffer." + (aggressive-indent-mode -1)) + + (add-hook 'beancount-mode-hook #'outline-minor-mode) + (add-hook 'beancount-mode-hook #'acdw/disable-aggressive-indent) + + (define-key beancount-mode-map (kbd "M-n") #'outline-next-visible-heading) + (define-key beancount-mode-map (kbd "M-p") #'outline-previous-visible-heading) +#+end_src + * Appendices ** Emacs' files -- cgit 1.4.1-21-gabe81