js layer readme minor improvements

- fill paragraphs
- hide url under descriptive text
- fix wording for linters
This commit is contained in:
d12frosted 2016-07-31 13:05:40 +03:00
parent a2df27e71a
commit c42a08a842
No known key found for this signature in database
GPG Key ID: 8D33A3B1A4AF7D30
1 changed files with 13 additions and 14 deletions

View File

@ -35,8 +35,8 @@ This layer adds support for the JavaScript language using [[https://github.com/m
* Install
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =javascript= to the existing =dotspacemacs-configuration-layers= list in this
file.
add =javascript= to the existing =dotspacemacs-configuration-layers= list in
this file.
You will also need to install =tern= to use the auto-completion and
documentation features:
@ -49,8 +49,8 @@ To use the formatting features, install =js-beautify=:
$ npm install -g js-beautify
#+END_SRC
To activate error checking using flycheck, install one of the
[[http://www.flycheck.org/en/latest/languages.html#javascript][available formatters]] such as =ESLint= or =JSHint=:
To activate error checking using flycheck, install one of the [[http://www.flycheck.org/en/latest/languages.html#javascript][available linters]]
such as =ESLint= or =JSHint=:
#+BEGIN_SRC sh
$ npm install -g eslint
# or
@ -63,8 +63,8 @@ To make tern re-use the server across multiple different editing sessions (thus
creating multiple =.tern-port= files for each document you have open [[http://ternjs.net/doc/manual.html][see here
for more details]]):
The variables provided below can be set when adding the =javascript= configuration
layer, as detailed in [[file:../../../doc/DOCUMENTATION.org::Setting%20configuration%20layers%20variables][this]] section of the documentation.
The variables provided below can be set when adding the =javascript=
configuration layer, as detailed in [[file:../../../doc/DOCUMENTATION.org::Setting%20configuration%20layers%20variables][this]] section of the documentation.
#+BEGIN_SRC emacs-lisp
(javascript :variables javascript-disable-tern-port-files nil)
@ -80,7 +80,8 @@ layer:
#+END_SRC
** Indentation
To change how js2-mode indents code, set the variable =js2-basic-offset=, as such:
To change how js2-mode indents code, set the variable =js2-basic-offset=, as
such:
#+BEGIN_SRC emacs-lisp
(setq-default js2-basic-offset 2)
@ -94,13 +95,11 @@ Similarly, to change how js-mode indents JSON files, set the variable
#+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 in your javascript buffer. If you want to inject it
in your own page, follow the instructions in
https://github.com/skeeto/skewer-mode#skewering-with-cors (install the
Greasemonkey script and then click the triangle in the top-right
corner - if it turns green, you're good to go).
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
in your javascript buffer. If you want to inject it in your own page, follow
[[https://github.com/skeeto/skewer-mode#skewering-with-cors][these instructions]] (install the Greasemonkey script and then click the triangle
in the top-right corner - if it turns green, you're good to go).
* Key Bindings