We have released a new version of the Elm Language Server! (v1.12.0 of the server, v1.4.0 of the VS Code client)
The biggest feature of this release was the implementation of the type inference system, which enables the ability add missing type annotations for functions, create missing function declarations from usage, and enable completions in places that were not previously possible. It will also enable more cool features in the future releases. This was a big effort (~7,000 lines of code added), but we did thorough testing and hope that it works well for you. Big thanks to the team from intellij-elm, as their type inference algorithm inspired us to bring it to the language server.
Another nice feature is you can now specify Main.elm entrypoints via elm-tooling.json. See https://github.com/elm-tooling/elm-language-server#configuration for more on how to configure it.
Something else to note is that elm-analyse is now disabled by default. In upcoming releases we will be replacing elm-analyse functionality with a native implementation, hopefully for a better overall experience.
Here is the full changelog:
- Added type inference
- Added type inference diagnostics for missing top level type annotations
- Added codeActions to infer annotations for functions
- Make entrypoints configurable via elm-tooling.json
- Create function declaration from usage
- Added goto definition and references for ports
- Tree sitter now parses the files incrementally after the initial scan
- More goto definition improvements
- Default elmAnalyseTrigger to never
If you find any bugs or have ideas for new features, feel free as always to create an issue on GitHub.