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)

Where Next?

Popular in Questions Top

beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> somethi...
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
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
JulienCorb
I am trying to implement my new.html.eex file to create new posts on my website. new.html.eex: <h1>Create Post</h1> <%= ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
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
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
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
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39523 209
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
New

We're in Beta

About us Mission Statement