about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-08-12 07:40:14 +0100
committerDavid Morgan <djm_uk@protonmail.com>2022-08-12 07:40:14 +0100
commit464b5232b492f7bc732074fc6bf65c2ccad9b460 (patch)
tree5425ceb207cefd40f237dddff7e2b9a34e443739
parent25a47d35ed130f167a17148171997bdd921a90e7 (diff)
downloaddotfiles-464b5232b492f7bc732074fc6bf65c2ccad9b460.tar.gz
Re-order/tweak init-web.el
-rw-r--r--.emacs.d/lisp/init-web.el30
1 files changed, 17 insertions, 13 deletions
diff --git a/.emacs.d/lisp/init-web.el b/.emacs.d/lisp/init-web.el
index 4e1d542..f6eb515 100644
--- a/.emacs.d/lisp/init-web.el
+++ b/.emacs.d/lisp/init-web.el
@@ -1,16 +1,8 @@
-;;; init-ui.el --- Web Configuration File -*- lexical-binding: t -*-
+;;; init-web.el --- Web Configuration File -*- lexical-binding: t -*-
 ;;; Commentary:
 ;; Some parts copied from prelude-web.el, prelude-js.el and prelude-css.el
 ;;; Code:
 
-(use-package css-mode
-  :custom
-  (css-indent-offset 2)
-  :config
-  (rainbow-mode +1))
-
-(use-package sass-mode)
-
 (use-package web-mode
   :custom
   (web-mode-enable-auto-pairing nil)
@@ -36,6 +28,20 @@
   (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
   (add-to-list 'auto-mode-alist '("/\\(views\\|html\\|theme\\|templates\\)/.*\\.php\\'" . web-mode)))
 
+(use-package css-mode
+  :custom
+  (css-indent-offset 2)
+  :config
+  (rainbow-mode +1))
+
+(use-package scss-mode
+  :config
+  (add-to-list 'auto-mode-alist '("\\.scss\\'" . scss-mode))
+  :custom
+  (scss-compile-at-save nil))
+
+(use-package sass-mode)
+
 (use-package tagedit
   :diminish
   :config (tagedit-add-paredit-like-keybindings)
@@ -44,6 +50,8 @@
 (use-package js2-mode
   :config
   (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
+  :custom
+  (js-indent-level 2)
   :hook (js2-mode . (lambda ()
                       (setq-local electric-layout-rules '((?\; . after)))
                       (setq mode-name "JS2")
@@ -54,9 +62,5 @@
   :config
   (add-to-list 'auto-mode-alist '("\\.mustache\\'" . mustache-mode)))
 
-(use-package scss-mode
- :custom
- (scss-compile-at-save nil))
-
 (provide 'init-web)
 ;;; init-web.el ends here