Supports elm 0.19
- Install VSCode from here
- Follow this link to install the plugin
- Make sure you have nodejs and therefore npm installed
- Make sure you have Elm installed
- Install elm-test and elm-format by running
npm install -g elm-test elm-format
in a terminal
- Errors and helpful tips will be shown whenever you save a file (Control + S)
- Format on save (Control + S)
- Suggests completions and snippets (Control + Space)
- Lists all references to a type alias, module, custom type or function (Alt + Shift + F12)
- Jump to the definition of a type alias, module, custom type or function
- Shows type annotations and documentation on hover for type alia, module, custom type or function
- Rename a type alias, module, custom type or function (F2)
- Browse file by symbols (Control + Shift + O)
- Browse workspace by symbols (Control + Shift + R)
- Codelenses show how many times you calling a function and if it's exposed or not
- Code folding
This extension contributes the following settings:
elmLS.trace.server
: Enable/disable trace logging of client and server communicationelmLS.elmPath
: The path to your elm executable.elmLS.elmFormatPath
: The path to your elm-format executable.elmLS.elmTestPath
: The path to your elm-test executable.elmLS.elmAnalyseTrigger
: When do you want the extension to run elm-analyse? Might need a restart to take effect.
-
Most features don't seem to work for me?
- This tool needs a valid elm project, please check if you have an
elm.json
. You can easily initialize your project withelm init
. If it still does work, please try if you get the same behavior with the elm-spa-example.
- This tool needs a valid elm project, please check if you have an
-
What's the relation to the language server?
- This vscode extension is including the elm-language-server which enables most of the used features.
-
Why do I need to install
elm
,elm-test
andelm-format
?- You will need to install
elm
andelm-test
to get all diagnostics andelm-format
for formatting. If your setup fails to find the global installations of those, you can use the settings panel in VSCode to set the paths to the executable manually. Alternatively you can also just install these to your local npmpackage.json
.
- You will need to install
-
Can I use an
elm-analyse
config?- Yes, you can, please check here for more details.
git clone --recursive git@github.com:elm-tooling/elm-language-client-vscode.git
cd elm-language-client-vscode
npm install
Open VSCode with this project (code .
) and press F5
to start debugging the plugin.