Add some js2 and html mode config

This commit is contained in:
Tom Willemse 2018-01-22 21:45:55 -08:00
parent b955ed62bb
commit 65739773b0

View file

@ -1207,12 +1207,27 @@ Computing Environment".
(add-hook 'js2-mode-hook 'subword-mode) (add-hook 'js2-mode-hook 'subword-mode)
#+END_SRC #+END_SRC
Set the basic offset to 2 spaces for JavaScript. Enable ~flycheck-mode~ to run syntax checkers such as eslint.
#+BEGIN_SRC emacs-lisp
(add-hook 'js2-mode-hook 'flycheck-mode)
#+END_SRC
Set the default indentation to 2 spaces.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq js2-basic-offset 2) (setq js2-basic-offset 2)
#+END_SRC #+END_SRC
** HTML mode
Enable electric pairing so I don't have to worry about closing =<=
and ="= and such.
#+BEGIN_SRC emacs-lisp
(add-hook 'html-mode-hook 'electric-pair-local-mode)
#+END_SRC
* Applications * Applications
- [[file:init/dired-init.org][Dired]] :: The Emacs file manager. Very powerful, and I don't use it - [[file:init/dired-init.org][Dired]] :: The Emacs file manager. Very powerful, and I don't use it