Original link: https://spacevim.org/cn/layers/lang/elm/
- Module Introduction
- Functional characteristics
- dependent on installation and enabling modules
- Dependent installation
- Enable module
- Shortcut keys
- Language-specific shortcut keys
- Interactive programming
Module Introduction
This module provides ELM development support for Spacevim, including code completion, syntax checking, and formatting of code.
Functional characteristics
- Code completion
- Syntax highlighting, aligning
- Unit Test
- Grammar check
- Document Query
At the same time, Spacevim also provides interactive programming for Elm Development.
Dependent installation and enable module dependent installation
First, you need to install the Elm language, the most convenient way to install is to use the official NPM package.
npm install -g elm
In order to perform unit tests within VIM, you need to install elm-test.
npm install -g elm-test
Code completion and document queries depend on Elm-oracle.
npm install -g elm-oracle
Automatic formatting of the code requires the installation of Elm-format.
npm install -g elm-format
Enable module
You can enable the module by adding the following configuration to the configuration file:
[[layers]] name = "lang#elm"
Shortcut key language Exclusive shortcuts
shortcut Keys |
Description |
SPC l d /K |
Document that queries the symbol under the cursor |
SPC l m |
Compiling the current document |
SPC l t |
Run unit Tests |
SPC l e |
Display error and warning messages |
SPC l w |
Open related documents using your browser |
Interactive programming
Start elm repl
The interactive process, the shortcut key is: SPC l s i
.
Transfer code to the REPL process execution:
shortcut Keys |
Description |
SPC l s b |
Send entire file contents to REPL |
SPC l s l |
Send current line contents to REPL |
SPC l s s |
Send the selected content to REPL |
Spacevim Language Module Elm