Gleam Support in Vim with ALE

February 11, 2024

Background

Over Christmas, I decided that it was a good time to try the Gleam track on Exercism. I prefer to start without doing too much research. Once the Exercism executable creates its directories and stub files, that’s when I start looking at tooling.

For me, it starts with Vim: no highlighting, but that wasn’t too surprising – it’s early days for Gleam. It wasn’t hard to find Gleam syntax highlighting. It comes straight from the gleam-lang account, so that looks pretty solid.

Can we do better?

Yes, with ALE.

When I ran :ALEInfo, I could NOT find any Gleam support. I had to double-check against the list of supported tools.

Usually, I’m not such an early adopter.
Usually, ALE is ahead of my needs

Until now.

Gleam Tooling

Running gleam --help shows that it has both a format command and a language server!

gleam --help has LSP and format built-in

How hard could this be?

ALE Support for Gleam

Good news:

and both have been merged ✅

gleam is now part of ALE

Make sure to update your ALE plugin to the latest version and enjoy 😄

Discuss on Twitter