Add some js2 and html mode config
This commit is contained in:
parent
b955ed62bb
commit
65739773b0
1 changed files with 16 additions and 1 deletions
|
@ -1207,12 +1207,27 @@ Computing Environment".
|
|||
(add-hook 'js2-mode-hook 'subword-mode)
|
||||
#+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
|
||||
(setq js2-basic-offset 2)
|
||||
#+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
|
||||
|
||||
- [[file:init/dired-init.org][Dired]] :: The Emacs file manager. Very powerful, and I don't use it
|
||||
|
|
Loading…
Reference in a new issue