Commit Graph

12 Commits

Author SHA1 Message Date
7280e44dc5 fix(beancount): link completion
Due to not escaping the literal ^ in the regexp.

Fix: #8414
Amend: d3e8ca8d9d
2025-06-10 21:28:52 +02:00
96ac6b0037 fix(beancount): completion edge cases
Like when `+beancount/clone-transaction` is invoked from an org-capture
template.
2025-05-30 20:54:27 +02:00
4d685029f9 perf(beancount): speed up flymake checker advice 2025-05-29 20:36:07 +02:00
8667b181fc feat(beancount): add account completion on budget directives 2025-05-27 20:41:57 +02:00
0199727de5 fix(beancount): relax prefix on virtual lines
Before, virtual includes were only followed if preceded by three
semicolons. Only one should do.
2025-05-24 20:09:19 +02:00
5026de65bb refactor(beancount): don't complete commodities from prices
Auto-generates price files are a common feature among beancount users;
scanning them is a lot of unnecessary work when just reading commodity
directives (and operating_currency options) should be more than enough.

Amend: 5df769e994
2025-05-24 17:31:41 +02:00
cfea950e60 fix(beancount): hangs when completion cache is empty 2025-05-22 21:17:12 +02:00
5df769e994 feat(beancount): add commodity/currency completion
Was supposed to be part of d3e8ca8. Now completes commodities/currencies
from declared commidities, operating_currency options, or price
directives. Currently only works in postings, but can be later extended
to complete in price directives and operating_currency options.

Amend: d3e8ca8d9d
2025-05-22 21:15:57 +02:00
7f8b24d1b8 fix(beancount): enhance +beancount/clone-{,this-}transaction
- `+beancount/clone-transaction` now completes for all transactions
  across this and any included files (depending on the value of
  `+beancount-files`).
- Handles an edge case where `+beancount/clone-this-transaction` would
  try and fail to clone a transaction at point where there wasn't any.
2025-05-22 16:39:20 +02:00
d3e8ca8d9d feat(beancount): enhance completion across the board
Enhances completion for beancount-mode in the following ways:

1. Adds completion for:
   - Event directives and values,
   - The payee field in transactions,
   - Currencies and commodities,
2. Fixes completion for #tag and ^links not working at the end of a
   transaction's heading.
3. Completion now scans not only the current file, but any included
   files (recursively) for candidates if `+beancount-files' is set to
   `auto`. It can otherwise be set to a list of static files or set to
   `nil` (reverts to only scanning the current buffer). This applies not
   only to completion-at-point functions, but also interactive commands
   like `beancount-insert-account'.

This is all very rudimentary and needs polish!
2025-05-22 16:33:23 +02:00
a02871ba83 feat(beancount): support lines only read by linter
Adds support for meta lines that only the flymake linter will see.
These are lines prefixed by any number of semicolons followed by a hash
then space. E.g.

;# include "../config.beancount"
;# 2025-01-01 pad Assets:Bank Equity:Opening-Balances

This is useful for silencing the linter in multi-file beancount projects
rather than suffer the usual deluge of multiple-include errors and
redundancies.
2025-05-22 16:33:23 +02:00
b173fedaff refactor(beancount): move autoloads to sub-directory 2025-05-22 16:33:23 +02:00