nallwhy

nallwhy

How are you configuring Zed for Elixir? (LSP, formatter, tips)

Hi everyone,

I’m trying to use Zed for Elixir development and recently enabled the expert settings, but I’m not confident my setup is actually working.

The Elixir LSP seems to get stuck showing “Starting Erlang node” repeatedly, as you can see in the attached screenshot, and never fully comes up.

I’d really appreciate help from anyone who’s successfully using Zed with Elixir. In particular:

  • Which LSP are you using? (expert, elixir-ls, etc.)
  • Any must-have expert settings for Elixir that aren’t obvious from the docs?
  • Common gotchas or pitfalls you ran into early on (and how you fixed them)

Here’s the my current Zed settings.

{
  "agent": {
    "default_model": {
      "provider": "zed.dev",
      "model": "claude-sonnet-4",
    },
    "always_allow_tool_actions": true,
    "model_parameters": [],
    "default_profile": "write",
  },
  "ui_font_size": 16,
  "buffer_font_size": 16,
  "theme": {
    "mode": "system",
    "light": "One Light",
    "dark": "One Dark",
  },
  "formatter": "language_server",
  "languages": {
    "Elixir": {
      "language_servers": [
        "expert",
        "!elixir-ls",
        "!next-ls",
        "!lexical",
        "tailwindcss-language-server",
      ],
    },
    "HEEX": {
      "language_servers": [
        "expert",
        "!elixir-ls",
        "!next-ls",
        "!lexical",
        "tailwindcss-language-server",
      ],
    },
  },
}

Thanks in advance!

Most Liked

Eiji

Eiji

While expert tend to be the best choice for LSP in future as far as I know it’s still in very early state. I’m using expert so far without a bigger problems, but I’m rather used to work in testing environments as I often check interesting beta/canary/nightly/rc releases. Therefore it’s rather rare that I would mention something as a “big issue”, simply because I often fix it or find a temporary workarounds (for example see my credo issue mention for post in 1.20.0-rc.0 release). :see_no_evil_monkey:

However if you aim for a prod stability you should use other language servers if possible. Look that the only release on their GitHub project is nightly one, so there is absolutely no guarantee that one day everything would suddenly stop working. At least for now I would rather recommend using expert only for feedback/testing purposes. :gear:

Here is a link to releases:

Here is also automated PR for 0.1.0 release (pay attention to the number of applied fixes):
https://github.com/elixir-lang/expert/pull/38

bottlenecked

bottlenecked

I just noticed this gotcha with the latest Zed updates (used to work before that): there’s something called Worktree trust and unless you’ve OK’d your project no LSP server will start.

I enabled this and immediately an .expert folder was created again (I tend to delete that by hand when the LSP server is misbehaving and then restart Zed, but that didn’t work now before enabling Worktree trust)

Last Post!

inf-rno

inf-rno

grazie. this was the issue for me

Where Next?

Popular in Questions Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement