For a few years now, I’ve been kind of telling myself, on and off, “you should really learn Rust you know, it looks like it has legs and could be rather useful”. In that same way that you tell yourself, as you get older, in an absent-minded kind of way, “You should really settle down now” or “Really! By your age you should have acquired a taste for dark chocolate”. Basically: “do something serious and grown up”. And, while I did settle down, and get to like dark chocolate, I didn’t get around to writing any Rust.
But sometimes you have to make your own opportunities, and I had an idea for a tiny application, and instead of reaching for Go or Python, I reached for Rust.
It was fun, and I wish I’d done it sooner.
(Is Rust “grown up”? I’m not sure, but over time I’ve learned that I like learning the lower-level details of the systems I work with, and Rust seems like a good next step in that process.)
While I wait for Helix to gain native spell-checking, I installed ltex-ls.
This is a language server for the open source LanguageTool, which checks both
spelling and grammar. By default, however, ltex-ls
uses American English. As a
Brit, accusatory little dots in the editor’s gutter because I had the temerity
to use “u” in “favourite” quickly became irritating.
Fortunately, ltex-ls
supports a lot of languages. However, I wasn’t
sure how to to set en-GB
as my language in the Helix configuration. In the
end, I went to the languages.toml
file in the Helix source code. This
file is built into Helix, and sets its (programming) language defaults. It is a
gold mine for understanding what’s possible in your own languages.toml
file.
After poking about for a while, I figured it out. I’d read the
Helix configuration documentation for language servers as saying that the
config
field in a language definition was usable only for passing formatting
information to the language server. But that isn’t the case at all.
To set the language used for spell-checking, in your
~/.config/helix/languages.toml
file (create it if it doesn’t exist), add the
ltex.language
option in the config
block like this:
[[language]]
name = "markdown"
language-server = { command = "/Users/mike/bin/ltex-ls/bin/ltex-ls" }
config = { ltex.language = "en-GB" }
And there you have it 🌟
I hope I remember this advice when I next start a new role:
Onboarding into mature systems often can be an extremely daunting, many month (or year) process. This is true for both managers and [engineers]. Failure streams are a short circuit to understanding the system, because failures are where the system is interesting and nuanced. Failures are where the heart of complexity, entropy, and flux in the system are.
Understanding failure modes helps you understand a system more quickly while simultaneously revealing high impact areas to work in. What a great piece of advice on how to start building trust with a new team.
I thought I’d take a stab at quick-fire journal entries.
First, we return to Helix and take a look at Kitty.
Then, a note about ClickHouse. Getting hands on with ClickHouse has helped me understand in practice what I previously only understood in theory (column-orientated datastores). In doing so, it’s expanded my horizons of what’s possible.
The beauty of the flower and its leaves in the morning light was enchanting. But what I really liked was the grain on the petals, taking down the brashness of a typical sunflower just the right number of notches.