Add section about configuring indentation via javascript layer configuration
This commit is contained in:
parent
0ccc0067c7
commit
dea1e9b468
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue