[emacs] assimilate web-mode and emmet-mode for better web dev xp
authorAmin Bandali <amin@gnu.org>
Sun, 2 Sep 2018 16:11:25 +0000 (12:11 -0400)
committerAmin Bandali <amin@gnu.org>
Sun, 2 Sep 2018 16:11:25 +0000 (12:11 -0400)
TODO: change indentation offsets to 2

.gitmodules
init.org
lib/emmet-mode [new submodule]
lib/web-mode [new submodule]

index a49345f..43fef81 100644 (file)
@@ -65,6 +65,9 @@
        path = lib/emacsql
        url = git@github.com:skeeto/emacsql.git
        no-byte-compile = emacsql-pg.el
+[submodule "emmet-mode"]
+       path = lib/emmet-mode
+       url = git@github.com:smihica/emmet-mode.git
 [submodule "epkg"]
        path = lib/epkg
        url = git@github.com:emacscollective/epkg.git
 [submodule "use-package"]
        path = lib/use-package
        url = git@github.com:jwiegley/use-package.git
+[submodule "web-mode"]
+       path = lib/web-mode
+       url = git@github.com:fxbois/web-mode.git
 [submodule "which-key"]
        path = lib/which-key
        url = git@github.com:justbur/emacs-which-key.git
index 9cb58ac..194a4b5 100644 (file)
--- a/init.org
+++ b/init.org
@@ -1167,6 +1167,33 @@ instead.
   :bind (:map haskell-mode-map
               ("C-c l l" . hs-lint)))
 #+end_src
+
+** SGML and HTML
+
+#+begin_src emacs-lisp
+(use-package sgml-mode
+  :config
+  (setq sgml-basic-offset 4))
+#+end_src
+
+** Web mode
+
+#+begin_src emacs-lisp
+(use-package web-mode
+  :mode "\\.html\\'")
+#+end_src
+
+** Emmet mode
+
+#+begin_src emacs-lisp
+(use-package emmet-mode
+  :bind* (("C-)" . emmet-next-edit-point)
+          ("C-(" . emmet-prev-edit-point))
+  :init
+  (setq emmet-move-cursor-between-quotes t)
+  :hook (web-mode css-mode html-mode sgml-mode))
+#+end_src
+
 * Emacs Enhancements
 
 ** [[https://github.com/justbur/emacs-which-key][which-key]]
diff --git a/lib/emmet-mode b/lib/emmet-mode
new file mode 160000 (submodule)
index 0000000..1acb821
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 1acb821e0142136344ccf40c1e5fb664d7db2e70
diff --git a/lib/web-mode b/lib/web-mode
new file mode 160000 (submodule)
index 0000000..e31d1dd
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit e31d1dd4ee436db8aaca3f35223af5a05fb47dec