feat(beancount): add account completion on budget directives

This commit is contained in:
Henrik Lissner
2025-05-27 20:41:57 +02:00
parent 0199727de5
commit 8667b181fc

View File

@ -149,7 +149,15 @@ will theirs, recursively)."
((beancount-looking-at ((beancount-looking-at
(concat "^" beancount-date-regexp (concat "^" beancount-date-regexp
"\\s-+" (regexp-opt beancount-account-directive-names) "\\s-+" (regexp-opt beancount-account-directive-names)
"\\s-+\\([" beancount-account-chars "]*\\)") 1 pos) "\\s-+\\([" beancount-account-chars "]*\\)")
1 pos)
(list (match-beginning 1) (match-end 1) (+beancount-account-completion-table)))
;; budget directive followed by an account
((beancount-looking-at
(concat "^" beancount-date-regexp "\\s-+"
"custom\\s-+\"budget\"\\s-+\\([" beancount-account-chars "]*\\)")
1 pos)
(list (match-beginning 1) (match-end 1) (+beancount-account-completion-table))) (list (match-beginning 1) (match-end 1) (+beancount-account-completion-table)))
;; pad directive followed by two accounts ;; pad directive followed by two accounts