The State of Elm IDEs/Editing Experiences

What editor/IDE are folks doing their Elm work in?

I have been a happy user of WebStorm with the Elm plugin. But there’s been a nagging error that doesn’t seem to actually be a problem, but it’s annoying. Still though, working in WebStorm has been a great experience and I’ve very hesitant to give it up.

In the past year has anyone switched from JetBrains for their Elm work to something else? Maybe VS Code? Or… something else?

It looks like there are a lot of forks of the Elm JetBrains plugin and it’s possible to “roll your own”. Has that worked out well for anyone? I tried this one, that I found posted about here, back in February (2022) but it does not look like it’s compatible with the latest version of WebStorm.

I’m really grateful for all the folks who work on these editor/IDE integrations.

I found the #editors-and-ides channel in Slack. Is there anywhere else this subject is being discussed?

7 Likes

I’m using Neovim with plugins. One thing I would like to see someday (maybe implement it myself) is color theme that will check function return type and color it accordingly. So for example all functions that are returning String will be green, all Int yellow blue.
Atm I’m using Nord theme and basically almost whole file is white…

3 Likes

Doom Emacs

You have to uncomment (elm +lsp) in your .doom.d/init.el file to get startet with elm.

I use Sublime, only with elm-format. Unfortunatelly, the LSP has never worked reliable for me (it is slow and kept crashing). I haven’t tried in a while, so maybe is better.

Tried VSCode, but it is just too slow for me.
I have also been experimenting with Helix lately, format works great, but haven’t tried the LSP there.

How well is that all working? I tried an Elm + Emacs setup years ago and didn’t get far with it, I think this was even before the Elm Language Server was a viable thing. I am assuming that (elm +lsp) hooks up the language server and I get various search, usage, linking, etc functionality?

Getting a little tired of VSCode sometimes. Atom too.

Very well.

I used emacs (without doom) and it was very tedious to configure, and spacemacs was buggy and too slow, but with doom emacs it works like a charm and is very fast!

This is my whole config for elm .doom.d/config.el, most of it is for disabling lsp features I find distracting: GitHub - elm-tooling/elm-language-server: Language server implementation for Elm

1 Like

SublimeText 4 with Elm Syntax Highlighting, Elm Format on Save and Elm Make this File.

I used to have LSP with LSP-elm some time ago but I uninstalled it out of frustration. It’s been so long that I don’t even remember what was frustrating about it.

I really liked the IntelliJ plugin, but to me it stoped working (not only annoying messages as you reported, but like, non functional anymore).

I did create a fork and changed just enough to make it work. But I don’t feel comfortable using it.

So I’m trying vscode and… it’s vscode. It works, it’s easy to setup but in the end of the day, still feels awkward. But gets the job done, with autocomplete, refactoring, and everything else I need. Almost. Could not find a way to integrate the automated tests yet.

1 Like

I use the IntelliJ plugin, and have learned to ignore the constant “error” from it. But I’m regularly worried that it’ll stop working, and I miss the days where there were new exciting features coming to it.

Besides having to learn JetBrains plugin development, and a new programming language (though Kotlin looks pretty cool!), it sounds really fun working on the plugin! It’s really satisfying to use things you’ve built yourself and scratching your own itch.

I already maintain too many projects, so I’m hoping someone will come along and pick up the torch (and get access to the intellij-elm repo).

I’ve also thought about contributing to the Elm Language Server instead, because I like the idea of language servers (not tied to a specific editor or IDE) and because I already know TypeScript (which it’s written in), but I have realized that I like JetBrains IDEs because:

  • They highlight “unresolved reference” and other errors with different styles (does not seem possible in VSCode). That’s very important to me, but another topic.
  • I can edit both Elm and F# in the same editor. (I don’t like VSCode’s F# support.)
  • They have awesome SQL features.
  • Their Vim mode is really great; VSCode’s is mediocre.
4 Likes

This is some good stuff. I’m a little surprised to not hear from anyone who loves VSCode.

I wish I was in a better phase of life for taking on the support of the JetBrains plugin. Even if all I did was fix bugs and keep releasing new versions to support new versions of IDEs that would be worth it. Maybe… maybe… that will change for me and I’ll have time time to take something like that on. I’ve also heard that Kotlin is a fun/interesting language.

I am heartened by the folks who say they are using SublimeText. I love SublimeText and all things being equal I’d probably trade off some of the IDE features of a WebStorm for the raw speed and responsiveness of SublimeText. I will do some more experiments with SublimeText. It was great to see a new version of SublimeText come out a few days ago.

I’m not sure I’m ready to try to learn Emacs (again)… but Doom Emacs does look pretty cool.

1 Like

You can compile the Elm IntelliJ plugin yourself to remove that annoying error and get an up to date version, instructions are mentioned here:

So that’s what I do, and jugle with vscode too.

The downside is that you have to recompile once you upgrade your IDE, not ideal for sure.

I switched from SublimeText to VSCode a couple of years ago for the LS support, and because VSCode felt simpler to use for the general editor features.

But those feelings might just be because I didn’t spend enough time learning what SublimeText could do… :man_shrugging:

However, VSCode is starting to feel cumbersome - the LS is slow, sometimes, and can send my CPU into overdrive. Don’t know if this is down to VSCode or the LS, but there are issues being reported regarding this on the LS issues for github.

Maybe I’ll give SublimeText another try if people are’t finding issues with the LS - but this is the killer for me, I really like the LS features so I’ll try any editor/IDE that can provide good LS support.

I’m a long time Vim user brand new to Elm, and at the moment I’m just using Vim with no plugins. I have to say, the default syntax highlighting is not bad! Even the default autoindent behavior has been pretty useful. If I keep using Elm for long enough I imagine I’ll experiment with plugins etc, but so far I don’t feel like I’m hurting for it.

1 Like

I use VSCode but I don’t love it. Mostly it works ok, occasionally the language server will stop working but 95% of the time it works and very useful.

I (and we as a team) are mostly happy with VSCode and its ElmLS plugin! (Big thanks to @razze and everyone contributed.)
Also some of us are using (neo)vim with ElmLS and living well.
Our primary project has 500+ Elm modules (including many autogenerated files) and 3 Elm apps.

Of course, editor occasionally stutters due to many reasons, but such situations are relatively slim with recent versions of ElmLS.

Personally I had come from Atom+Elmjutsu world when 0.18 was prime and a bit into 0.19. Compared to them VSCode+ElmLS is fast enough, even to this day. (At the end of its era Atom was verrrrry slow esp. on startup, but also on and around usual coding.)

1 Like

I use elm-mode with Emacs. I have elm-format installed, so I do:

(setq elm-format-on-save t)

I also wrote my own command to make it easy to paste the two lines printed by elm publish, complaining that a tag doesn’t exist, so I NEVER have to remember them. I just c-p up to the first line, c-x c-y, enter that command, then do the same for the second line. Then elm publish again.

(defun paste-elm-package-publish ()
  "Paste one of the lines printed by 'elm package publish'."
  (interactive)
  (kmacro-exec-ring-item '([?\C-e ?\C-  ?\C-a ?\M-f ?\M-b ?\M-w ?\M-> ?\C-y] 0 "%d") 1))
(define-key ctl-x-map "\C-y" 'paste-elm-package-publish)

I set up one shell buffer, renamed to *reactor-shell* with an elm reactor in the project I’m working on, and do commands in the other. For my big projects, that need an index.html to import JavaScript files (for ports and custom HTML elements), I have a shell script to build the Elm code into an elm.js file that is loaded by index.html. bin/build does the build, bin/update-site builds and uses rsync to update the live site.

Emacs rocks!

1 Like

That is probably because it is that time of the year.

Winter is coming to the Nord :smiley:

I use VSCode with Elm tooling. Elm tooling has been installed more than 58,000 times. It tells you a bit about VSCode popularity among Elm users :wink:

Using Vim with elm-vim plugin.

2 Likes

Lunarvim

Neovim with a nice set of default plugins (like Doom Emacs). Gives you format, LSP, treesitter, etc. Also has a cool menu if you hit spacebar (to learn anything you don’t know yet).

1 Like