ElmLS 0.7.0 for VSCode

I released new versions of ElmLS and the elm language server, here are some of the improvements:

  • Made elm.json schema completions better and more helpful

  • Fixed ‘"’ breaking syntax highlighting

  • Updated the language server

    • Completions should be much nicer to use now
    • Improved performance for codeLenses
    • Do not crash when the elm compiler generates invalid json
    • Fix codeLens bug showing wrong count for types
15 Likes

As always thanks for all your hard work on this.

Completions for me seem somewhat broken. Here is an editing situation:

saveAddressButton address =
    ...

I want to add a parameter to this function so that it reads:

saveAddressButton address message =

When I get to the end of message and press space it suddenly changes it to Msg.ClearFlashMessage which so I’m left with:

saveAddressButton address Msg.ClearFlashMessage =

Changing this to what I actually want is kind of hard I have to type message and then use the arrow keys.

There are a couple of other similar situations, in a patter matching a Result try writing Err err and it changes it to Err Err.

So I’m guessing I’m missing some kind of setting that says “Do not change anything on ‘space’” or something but I cannot find it. Any ideas?

I don’t think it’s fixable by a setting, I will create a hotfix as soon as I’m home.

I foolishly thought, that “space” would be a good commit character. It worked fine in cases where you actually want to pick a completion, but I guess I didn’t test the cases where you “just want to type”.

Okay, thanks. I remember I had a similar problem with VSCode completions in general, in that ‘Return’ chose from the list of selections, but I actually just wanted to add a new line and found that difficult often enough that I changed a setting so that completions were accepted via ‘tab’ rather than ‘tab or return’.

1 Like

A hotfix has been pushed. Please let me know if it resolves your problem.

Great, yes, that appears to fix my problem. Thank you.

1 Like

Thank you for your plugin! It feels great to have the compiler errors in VSCode!

I was wondering how you call this area here (the “hover” perhaps?):

It would be even better if there could be color here, so as to match the terminal errors (at the moment the highlighted text is rendered with #, as visible in the screenshot). I imagine it’s a VSCode limitation, but if not I’d be willing to investigate it!

It is indeed a vscode limitation. But if your willing to look into it, I guess having vscode updated and then the language server spec would be what needs to happen.

1 Like

According to this comment, they’re considering adding a feature to make it possible. I’ll be on the lookout for when they roll it out.

I just released version 0.7.2 for vscode and a new version for the language server.

This is just a small quality of life release, including a thing for 0.19.1 and a change in name, to help visibility in the vscode marketplace.

Here are the changes:

0.7.2

  • Update elm.json schema to allow 0.19.1 as a version

  • Renamed extension from ElmLS to Elm

  • Updated the language server

    • Add more feedback on init for common errors
    • Make sure a file without permissions doesn’t crash the server
    • -v to print version was not working
8 Likes

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