Files
doomemacs/modules/lang/beancount

:lang beancount

Description   unfold

This module adds support for Beancount to Emacs. Beancount, like ledger, lets you manage your money in plain text.

Maintainers

Module flags

+lsp
Enable LSP support for beancount-mode. Requires doom-module::tools lsp and a langserver (supports beancount-language-server).

Hacks

  • Adds rudimentary syntax highlighting to custom directives, because beancount-mode doesn't out of the box.
  • Fixes a bug in beancount-fava where the browser doesn't open after starting Fava because of ANSI codes in Fava's output.
  • Fixes syntax checker only operating on visible region in narrowed buffers
  • Fixes file path resolution errors from syntax checker due to relative paths (e.g. for include and document attributes/directives).
  • Adds support for "meta lines"; beancount code that is visible only to the syntax checker, so users can resolve false-positives in multi-file beancount ledgers. E.g.

    ;# include "../config.beancount"
    ;# 2025-01-01 pad Assets:Bank Equity:Opening-Balances
  • Adds code completion for:

    • Event directives and values
    • The payee field in transactions
    • Currencies and commodities
  • Fixes completion for #tags and ^links when they're not on their own line.
  • Adjusted code completion to scan not only the current file, but any included files (recursively) for candidates.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module requires:

Usage

This module provides beancount-mode for beancount ledger files. Opening any *.beancount or *.bean will activate it.

Keybinds

Binding Description
kbd:<localleader> b Display balance sheet in popup
kbd:<localleader> c Run bean-check on current file
kbd:<localleader> l Show all transactions linked to the one at point
kbd:<localleader> q
kbd:<localleader> x
kbd:<localleader> i c Clone a transaction (select one from all files)
kbd:<localleader> i C Clone transaction at point
kbd:<localleader> i a Insert account
kbd:<localleader> i d Insert date
kbd:<localleader> i p Insert prices (requires bean-price)
kbd:<localleader> s r Sort transactions in selected region
kbd:<localleader> s b Sort transactions in buffer

Configuration

Look up customizable variables for beancount-mode via kbd:C-h V and typing ^beancount-.

On top of those, this module exposes the following variable:

+beancount-files (default: 'auto)
Controls what files to scan for code completion candidates. The default value, 'auto, causes it to scan the current file and any included files (recursively). If set to nil, only the current buffer is considered (much faster for massive, multi-file ledgers). Can also be a list of file paths (can be relative to the current file).

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?