Elm language server and a new VSCode Plugin

Great job @razze!

I was looking for such a great experience for Elm in VSCode for years.

It’s refreshing to see someone getting things done rather than endlessly discussing how to do them :slight_smile:


Nice job, I think the next version will fix my problem with go to definitions, path bug I thought. Did anyone know the next release for vscode ?

Whenever I feel like it’s stable enough. There have been some big changes.

this looks sick, it’s what I’ve wanted for years


Is there a way to get ElmLS in VSCode to stop auto-opening the VSCode terminal when it finds errors? Love the tool, but that aspect is jarring.


Thx for reporting, should be fixed by https://github.com/elm-tooling/elm-language-client-vscode/commit/1ee0523c7942824eb3208828ed6b41b13ac3ce46
It will take some time till you get this, as I got some more stuff to do, until I can prepare a new release

1 Like

I pushed new versions of the server and the client:
Server changelog:

  • Use WASM version of tree-sitter and updated tree-sitter - This mean multiple parsing improvements
  • Added completions for methods defined in a let scope
  • Added completions from case branches
  • Added code actions for some rename suggestions from elm make
  • Removed the ability to run elm-test for now, as it was problematic
  • Determine the used elm version, so that we’re ready for 0.19.1
  • Cleaned up the symbols that we show in the outline or when searching
  • Fixed multiple problems with multi workspace useage
  • Fixed type references including (…) on search or rename
  • Fixed elm make not reporting the correct path in some edgecases

Client changes:

  • Don’t reveal the output channel on each log
  • Better names for output channels in multi workspace projects

Thanks to everyone involved.


This is great progress, thank you.

Am I right that upgrading should be as simple as reloading VSCode? Assuming it has already checked for updates, if you look in the Extensions tab of VSCode and find ElmLS it states “reload required” so I just hit that and I seem to have the updated version. Is that all I need to do?

I am currently getting the message:

The Elm Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.

This seems to occur whenever I fix something that is underlined as a warning (light blue in my theme). Such as an unused import. This is if I fix it manually, say by just deleting the line. I think I have to save the file to get it to cause the server crash, but if I don’t then I have warnings on the wrong lines.

1 Like

I pushed a hotfix:

  • Revert determination of used elm compiler version, as it was causing file open to go unnoticed

Can you open an issue on github? I’m away for the weekend :slight_smile:

Sure: https://github.com/elm-tooling/elm-language-server/issues/111

Thank you @razze for these awesome tools!
Even just the functionality of seeing the diagnostics from elm-analyze inline is very helpful. It just drew my attention to several cases of unused parameters and locals. In one case this diagnostic also uncovered a bug where I constructed a value in a let block but forgot to integrate in the in expression.

In my current project, the diagnostics stop appearing after a few rounds of changes. And log for elmLS in VSCode shows exceptions. So I keep restarting the VSCode window often when making use of this extension.

Current content of elm-analyse.json (just started to use this):

    "checks": {
        "SingleFieldRecord": false,
        "MultiLineRecordFormatting": false

Can you check if we’re already tracking the error your hitting over at github?

It was not tracked. Now it is, at https://github.com/elm-tooling/elm-language-client-vscode/issues/16

I pushed updates to the vscode client and the language server

- Fixed document changes causing high cpu load
- Included a fix for a memory out of bounds error that could occur
- Removed `runtime` option, that is now unneeded due to us using wasm
- Use normal file path rather than file:// protocol when reading a file

Another interesting development that I would like people to be aware about: https://github.com/Krzysztof-Cieslak/vscode-elm/issues/334


We also now have docs on how to setup the LS for Sublime Text


Thank you for the fast update!
I tested with version 0.4.2 and did not see it crashing so far.
It looks like the issue of stopping diagnostics is resolved with version 0.4.2.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.