As published on my blog at https://michaelrätzel.com/blog/introducing-the-pine-vs-code-extension-and-elm-language-server
Hi all
I published a VS Code extension integrating Elm developer tools and language services.
It’s available in the VS Code extension marketplace at https://marketplace.visualstudio.com/items?itemName=Pine.pine
This new tool packages the features found in the Elm Editor project for reuse in VS Code. While Elm Editor is a standalone environment optimized for minimal setup, the VS Code extension is for integration in existing development setups.
One key difference from other implementations of VS Code extensions is that the language services are written entirely in Elm.
Another innovation is that instead of compiling from Elm to JavaScript, it runs on a new kind of virtual machine. (More on that soon)
Note that this tool is in an early stage of development. You will see some lag depending on the number and size of Elm modules.
A snapshot of the features as of today:
- Syntax highlighting
- Formatting
- Error highlighting
- Completions - Shows completion suggestions matching the current context
- Hover tips - Shows type annotations and documentation for a type alias, module, type, or function
- Go to Definition - Jump to the definition of a type alias, module, type, or function
- Go to symbol - module outline
- Find All References
The VS Code extension is a thin wrapper for connecting to a language server, packaging the above-listed functionality. It uses the language server protocol, which should make reusing that part in other code editors easier.
Building these tools wouldn’t have been possible without the many excellent libraries and tools developed by others over the years. A special shoutout to Mats Stijlaart, Jeroen Engels, @lue-bird, and everyone else contributing to the ongoing development and improvement of the elm-syntax package. I especially enjoyed the performance optimizations introduced in 2024, which greatly improved response times!
Outlook
One feature I have planned to add in the future is viewing and running tests via the GUI.
Besides that, I am working on more optimizations to improve response times and support larger codebases.
I’d love to hear your thoughts and experiences!
Here’s to a fantastic year ahead for Elm development. Happy coding!