2017-08-21 20:12:25 +02:00
|
|
|
#+TITLE: :lang javascript
|
|
|
|
|
|
|
|
This module adds Javascript support.
|
|
|
|
|
2018-04-18 18:05:44 -04:00
|
|
|
+ Code completion (tide)
|
2017-08-21 20:12:25 +02:00
|
|
|
+ REPL support (nodejs-repl)
|
|
|
|
+ Refactoring commands (js2-refactor)
|
|
|
|
+ Syntax checking (flycheck)
|
|
|
|
+ Browser code injection with skewer-mode
|
|
|
|
+ Coffeescript & JSX support
|
|
|
|
+ Jump-to-definitions and references support (xref)
|
|
|
|
|
|
|
|
* Table of Contents :TOC:
|
2018-04-18 18:05:44 -04:00
|
|
|
- [[Install][Install]]
|
|
|
|
- [[Node & NPM][Node & NPM]]
|
|
|
|
- [[Appendix][Appendix]]
|
|
|
|
- [[Commands][Commands]]
|
2017-08-21 20:12:25 +02:00
|
|
|
|
|
|
|
* Install
|
|
|
|
** Node & NPM
|
|
|
|
To get started with Javascript, you'll need node and its package manager, NPM, installed.
|
|
|
|
|
|
|
|
*** MacOS
|
|
|
|
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
|
|
|
|
brew install node
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
*** Arch Linux
|
|
|
|
#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes")
|
|
|
|
sudo pacman --needed --noconfirm -S nodejs npm
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
* Appendix
|
|
|
|
** Commands
|
|
|
|
| command | key / ex command | description |
|
|
|
|
|----------------------------------+------------------+------------------------------------------------------------|
|
2019-02-18 01:56:38 -05:00
|
|
|
| ~+javascript/open-repl~ | =:repl= | Open the NodeJS REPL (or send the current selection to it) |
|
2017-08-21 20:12:25 +02:00
|
|
|
| ~+javascript/skewer-this-buffer~ | =SPC m S= | Attaches a browser to the current buffer |
|