docs/layers/lang/javascript.md
This layer is for JavaScript development.
To use this configuration layer, update your custom configuration file with:
[[layers]]
name = "lang#javascript"
auto_fix: auto fix problems when saving files, disabled by default.
enable_flow_syntax: Enable configuration for flow, disabled by default.
If you need these features, you can enable them in the layer config:
[[layers]]
name = "lang#javascript"
auto_fix = true
enable_flow_syntax = true
format_on_save: Enable/disable file formatting when saving current javascript file. By default,
it is disabled, to enable it:
[[layers]]
name = 'lang#javascript'
format_on_save = true
| Key Bindings | Descriptions |
|---|---|
<F4> (Insert/Normal) | Import symbol under cursor |
SPC j i | Import symbol under cursor |
SPC j f | Import missing symbols |
SPC j g | Jump to module under cursor |
Ctrl-j i (Insert) | Import symbol under cursor |
Ctrl-j f (Insert) | Import missing symbols |
Ctrl-j g (Insert) | Jump to module under cursor |
| Mode | Key Binding | Description |
|---|---|---|
| Normal | SPC l g d | Generate JSDoc |
To run JavaScript code in current buffer, you can press SPC l r. It will run without losing focus,
and the result will be shown in a runner buffer.
Start a node -i inferior REPL process with SPC l s i.
Send code to inferior process commands:
| Key Bindings | Descriptions |
|---|---|
SPC l s b | send buffer and keep code buffer focused |
SPC l s l | send line and keep code buffer focused |
SPC l s s | send selection text and keep code buffer focused |