Elm LSP for VS Code
Elm language support powered by elm-lsp-rust.
Features
- Hover: Type information and documentation
- Go to Definition: Jump to symbol definitions
- Find References: Find all usages across your project
- Rename: Safe rename for functions, types, variants, and fields
- Code Actions: Quick fixes and refactorings
- Diagnostics: Compiler errors via elm/lamdera make
- Completion: Code completion with
. trigger
- Document Symbols: Outline view of current file
- Workspace Symbols: Search symbols across project
Special Commands
- Move Function: Move a function to another module (updates all imports)
- Generate ERD: Create entity-relationship diagrams from types
Installation
From VS Code Marketplace
Search for "Elm LSP" by CharlonTank in the Extensions view.
From Source (Development)
Clone the repository:
git clone https://github.com/CharlonTank/elm-lsp-rust
cd elm-lsp-rust
Build the LSP server:
cargo build --release
Open the vscode-elm-lsp folder in VS Code:
cd ../vscode-elm-lsp
npm install
code .
Press F5 to launch the Extension Development Host
Configuration
| Setting |
Description |
Default |
elm-lsp.server.path |
Path to elm_lsp binary |
Auto-detect |
elm-lsp.trace.server |
Trace level for debugging |
off |
Requirements
- Elm 0.19.x installed
- An
elm.json file in your workspace
License
MIT
| |