summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2013-09-02 09:29:29 +0100
committerAlan Pearce2013-09-02 09:29:29 +0100
commit8214342af8a51b9ed63d9bea27cbf7b8051f0b4b (patch)
tree0f08920bd9d037d63ea1fe9e8bc3226e4ebcdebc /emacs
parent7d584cc54ba2162560334261a6f1acfb78530603 (diff)
downloadnixfiles-8214342af8a51b9ed63d9bea27cbf7b8051f0b4b.tar.lz
nixfiles-8214342af8a51b9ed63d9bea27cbf7b8051f0b4b.tar.zst
nixfiles-8214342af8a51b9ed63d9bea27cbf7b8051f0b4b.zip
Emacs: setup web-mode
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index c26d1428..2d80bc81 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -1170,6 +1170,14 @@ Works with: arglist-cont-nonempty, arglist-close."
   :defer t
   :config (setq sgml-basic-offset 4))
 
+(use-package web-mode
+  :defer t
+  :mode (("/views/.*\\.php\\'" . web-mode)
+         ("/templates/.*\\.php\\'" . web-mode))
+  :config (setq web-mode-code-indent-offset 4
+                web-mode-css-indent-offset 4
+                web-mode-markup-indent-offset 4))
+
 ;;;; Windows & Frames
 
 (setq frame-title-format