summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2015-04-09 13:12:30 +0100
committerAlan Pearce2015-04-09 13:12:46 +0100
commitea5a661aa5249364c6f58fc3f66dcb35104c933e (patch)
tree97758f5e979595aee2a113aff80b5c664c8bd44a
parentc1f68b429dfd508b536e3115c18b58ba9065970e (diff)
downloadnixfiles-ea5a661aa5249364c6f58fc3f66dcb35104c933e.tar.lz
nixfiles-ea5a661aa5249364c6f58fc3f66dcb35104c933e.tar.zst
nixfiles-ea5a661aa5249364c6f58fc3f66dcb35104c933e.zip
Emacs: Install and configure ledger-mode
-rw-r--r--tag-emacs/emacs.d/Cask1
-rw-r--r--tag-emacs/emacs.d/init.el12
2 files changed, 12 insertions, 1 deletions
diff --git a/tag-emacs/emacs.d/Cask b/tag-emacs/emacs.d/Cask
index 49cc0116..0d5b5984 100644
--- a/tag-emacs/emacs.d/Cask
+++ b/tag-emacs/emacs.d/Cask
@@ -53,6 +53,7 @@
 (depends-on "jquery-doc")
 (depends-on "js2-mode")
 (depends-on "litable")
+(depends-on "ledger-mode")
 (depends-on "lua-mode")
 (depends-on "magit")
 (depends-on "markdown-mode")
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index 735993af..40f59b2f 100644
--- a/tag-emacs/emacs.d/init.el
+++ b/tag-emacs/emacs.d/init.el
@@ -231,7 +231,8 @@
   :commands (global-smart-tab-mode)
   :init (global-smart-tab-mode)
   :config (progn
-            (nconc smart-tab-completion-functions-alist '((php-mode . php-complete-function)))
+            (nconc smart-tab-completion-functions-alist '((php-mode . php-complete-function)
+                                                          (ledger-mode . ledger-pcomplete)))
             (diminish 'smart-tab-mode "")))
 
 (req-package company
@@ -792,6 +793,15 @@ mouse-1: Display Line and Column Mode Menu"))))))
 (req-package lua-mode
   :defer t)
 
+(req-package ledger-mode
+  :mode ("\\.ledger\\'" . ledger-mode)
+  :config (progn
+            (defun setup-ledger-mode ()
+              (setq-local indent-tabs-mode nil))
+            (add-hook 'ledger-mode-hook #'setup-ledger-mode)
+            (setq ledger-use-iso-dates t
+                  ledger-post-use-completion-engine 'ido)))
+
 (req-package ruby-mode
   :mode (("\\.rb\\'" . ruby-mode)
          ("\\.cap\\'" . ruby-mode)))