summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2015-05-20 16:30:25 +0200
committerAlan Pearce2015-05-20 16:30:25 +0200
commit84b6bbad2e6fb741b8941fc932c17d00f1bf5da3 (patch)
tree5ddfd2f6a23b0c21c1a1d0a8caa758248f22e166
parent8f86a9d18705be2fa2257ea5e38a05f497e2ddd6 (diff)
downloadnixfiles-84b6bbad2e6fb741b8941fc932c17d00f1bf5da3.tar.lz
nixfiles-84b6bbad2e6fb741b8941fc932c17d00f1bf5da3.tar.zst
nixfiles-84b6bbad2e6fb741b8941fc932c17d00f1bf5da3.zip
Emacs: Add alignment rules for Javascript objects
-rw-r--r--tag-emacs/emacs.d/init.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index c7fa0a82..28e9a183 100644
--- a/tag-emacs/emacs.d/init.el
+++ b/tag-emacs/emacs.d/init.el
@@ -1111,6 +1111,13 @@ mouse-1: Display Line and Column Mode Menu"))))))
 (setq sentence-end-double-space t
       line-move-visual nil)
 
+(req-package align
+  :config (progn
+            (add-to-list 'align-rules-list
+                         '(colon-key-value
+                           (regexp . ":\\(\\s-*\\)")
+                           (modes  . '(js2-mode))))))
+
 (setq x-select-enable-clipboard t)
 (if (functionp 'x-cut-buffer-or-selection-value)
     (setq interprogram-paste-function 'x-cut-buffer-or-selection-value))