diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2020-05-20 21:39:22 -0400 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2020-05-20 21:39:22 -0400 |
commit | 0009b04394969cc305471ed72bacd8a9a5f3159c (patch) | |
tree | b63dc42b57c8cb8977021098e5980db8bb81f97b /doom.d | |
parent | ebbd123ce156c93b91466312d4fff381a180760b (diff) |
hledger mode
Diffstat (limited to 'doom.d')
-rw-r--r-- | doom.d/config.el | 39 | ||||
-rw-r--r-- | doom.d/packages.el | 2 |
2 files changed, 41 insertions, 0 deletions
diff --git a/doom.d/config.el b/doom.d/config.el index 125c03f..6bedc3d 100644 --- a/doom.d/config.el +++ b/doom.d/config.el @@ -107,4 +107,43 @@ (after! mu4e-maildirs-extension (mu4e-maildirs-extension)) +(setq hledger-jfile "~/.hledger.journal") + +(use-package! hledger-mode + :defer t + :mode ("\\.journal\\'" "\\.hledger\\'") + :commands hledger-enable-reporting + :preface + (defun hledger/next-entry () + "Move to next entry and pulse." + (interactive) + (hledger-next-or-new-entry) + (hledger-pulse-momentary-current-entry)) + + (defface hledger-warning-face + '((((background dark)) + :background "Red" :foreground "White") + (((background light)) + :background "Red" :foreground "White") + (t :inverse-video t)) + "Face for warning" + :group 'hledger) + + (defun hledger/prev-entry () + "Move to last entry and pulse." + (interactive) + (hledger-backward-entry) + (hledger-pulse-momentary-current-entry)) + + :config + (set-company-backend! 'hledger-mode '(hledger-company)) + + (map! :map hledger-mode-map + "M-p" #'hledger/prev-entry + "M-n" #'hledger/next-entry + :localleader + "e" #'hledger-jentry + "j" #'hledger-run-command) + ) + (load-file "~/.doom.d/config.local.el") diff --git a/doom.d/packages.el b/doom.d/packages.el index adb100f..1a4873c 100644 --- a/doom.d/packages.el +++ b/doom.d/packages.el @@ -46,4 +46,6 @@ ;; our package manager can't deal with; see raxod502/straight.el#279) ;(package! builtin-package :recipe (:branch "develop")) +(package! hledger-mode) + (load-file "~/.doom.d/packages.local.el") |