From: Amin Bandali Date: Sun, 2 Sep 2018 16:11:25 +0000 (-0400) Subject: [emacs] assimilate web-mode and emmet-mode for better web dev xp X-Git-Url: https://git.shemshak.org/~bandali/configs/commitdiff_plain/d98421d58e0407f3a08259259f0dd9ab09163874 [emacs] assimilate web-mode and emmet-mode for better web dev xp TODO: change indentation offsets to 2 --- diff --git a/.gitmodules b/.gitmodules index a49345f..43fef81 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 @@ -203,6 +206,9 @@ [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 diff --git a/init.org b/init.org index 9cb58ac..194a4b5 100644 --- 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 index 0000000..1acb821 --- /dev/null +++ b/lib/emmet-mode @@ -0,0 +1 @@ +Subproject commit 1acb821e0142136344ccf40c1e5fb664d7db2e70 diff --git a/lib/web-mode b/lib/web-mode new file mode 160000 index 0000000..e31d1dd --- /dev/null +++ b/lib/web-mode @@ -0,0 +1 @@ +Subproject commit e31d1dd4ee436db8aaca3f35223af5a05fb47dec