xiaoqiang

xiaoqiang

These past few days, I’ve tried switching from Neovim to Helix, and so far the experience has been great. Compared to neovim, which requires multiple plugins and configurations, Helix requires very little configuration to start using it for Elixir. Plus, it has a great shortcut key prompts, so if you’ve used vim before, you can quickly get used to it.

In addition to its out-of-the-box features, one of my favorite features of Helix is its multi-selection editing!

Prerequisites:

  • Ensure that elixir-ls is installed and in your path. On macOS, you can use brew install elixir-ls.

Put the following configuration in .config/helix/languages.toml, and happy coding!

[[language]]
name = "elixir"
scope = "source.elixir"
injection-regex = "elixir"
file-types = ["ex", "exs"]
roots = ["mix.exs"]
auto-format = true
diagnostic-severity = "Hint"
comment-token = "#"
indent = {tab-width = 2, unit = " "}
language-server = {command = "elixir-ls"}

Showing Posts 1 to 10

dimitarvp

dimitarvp

Can it do the template coloring in the same files i.e. two different syntaxes in one file? The HEEX stuff?

AstonJ

AstonJ

@OvermindDL1 posted about it last year on DT, I gave it a quick go but didn’t have time to use it much after that, it seemed quite basic at the time tho.

I added the link to it in your post :023:

cloudytoday

cloudytoday

Yep, it’s awesome. I’m also using a not yet merged PR which adds a file tree to it, it’s stable and I had no issues with it for a month or so.

xiaoqiang

xiaoqiang OP

It is possible because their syntax highlighting uses tree-sitter.

Furthermore, I suggest updating the Elixir configuration to support specific features of the language server in heex. Additionally, I discovered that my understanding of the “injection-regex” configuration item was incorrect, and we may not require it.

[[language]]
name = "elixir"
scope = "source.elixir"
file-types = ["ex", "exs", "heex"]
roots = ["mix.exs"]
auto-format = true
diagnostic-severity = "Hint"
comment-token = "#"
indent = {tab-width = 2, unit = " "}
language-server = {command = "elixir-ls"}
xiaoqiang

xiaoqiang OP

Awesome!

dimitarvp

dimitarvp

Nice, thank you.

Does it deal with umbrella projects well? I noticed that it detects mix.exs but umbrellas have several such files at a different level.

xiaoqiang

xiaoqiang OP

Based on current usage, LSP can function normally with Umbrella projects.

I conducted a test using an Umbrella app named “hello” with a subproject at “hello/apps/world”. Only “hello/apps/world/.elixir_ls” was generated, and it seems that “hello/.elixir_ls” was not generated.

I guess that elixir-ls has implemented support for Umbrella projects, even though “mix.exs” exists in the directory.

freewebwithme

freewebwithme

I am just trying to use Helix, does come with dialyzer support?

cloudytoday

cloudytoday

Yep, it does. You will see all the warning right in the editor.

fceruti

fceruti

I read the whole tutor this weekend, and I’m all set up. I’m giving it a go this week :slight_smile:

Thanks for sharing!

Where Next? Top

Trending in Dev Env & Tools Top

srowley
I have really enjoyed dialing in a set of static analysis tools and skills that help me help LLMs write better code. One gap I haven’t se...
New
AstonJ
Curious whether anyone is taking any specific precautions, such as creating new non-administrative user-accounts and then simply copying ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews