Add section about configuring indentation via javascript layer configuration

This commit is contained in:
Piotr Grzesik 2018-01-01 18:07:59 +01:00 committed by syl20bnr
parent 0ccc0067c7
commit dea1e9b468
1 changed files with 11 additions and 0 deletions

View File

@ -92,6 +92,12 @@ such:
(setq-default js2-basic-offset 2)
#+END_SRC
or when adding the =javascript= configuration layer:
#+BEGIN_SRC emacs-lisp
(javascript :variables js2-basic-offset 2)
#+END_SRC
Similarly, to change how js-mode indents JSON files, set the variable
=js-indent-level=, as such:
@ -99,6 +105,11 @@ Similarly, to change how js-mode indents JSON files, set the variable
(setq-default js-indent-level 2)
#+END_SRC
or when adding the =javascript= configuration layer:
#+BEGIN_SRC emacs-lisp
(javascript :variables js-indent-level 2)
#+END_SRC
** REPL
To use the available JS repl, you need a running httpd server and a page loaded
with skewer. If a blank page serves your needs, just use the run-skewer command