S├Ękun blog

Using hledger with ledger-mode | Unconstant Conjunction

25/01/2021, 16:03:00

Utiliser hledger avec ledger-mode de emacs.

(straight-use-package 'flycheck)
(straight-use-package 'flycheck-hledger)

(defun custom-ledger-hook ()
(add-hook 'before-save-hook 'ledger-mode-clean-buffer nil 'local)
(setq ledger-mode-should-check-version nil
ledger-report-links-in-register nil
ledger-binary-path "hledger")
(eval-after-load 'flycheck
'(require 'flycheck-hledger))
(flycheck-mode))

(add-hook 'ledger-mode-hook #'custom-ledger-hook)