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!

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):

2 Likes

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)

1 Like