Skip to content

Elixir expert-lsp does not work in remote development #26

@oddnugget

Description

@oddnugget

Summary

The new elixir language server expert fails to provide completions, hover documentation and jump to definition when used in remote development environments.

Description

The lsp seems to start correctly. Looking at the log-file that expert creates in your-project/.expert/expert.log shows that it is responding to various events emitted by the editor.

[debug] handled notification client -> server workspace/didChangeConfiguration in 7ms
13:45:55.312 [info] ################### opened file:///<REDACTED>/file.ex
13:45:55.312 [debug] handled notification client -> server textDocument/didOpen in 9ms
13:45:55.315 [debug] handled notification client -> server initialized in 13ms

However, no lsp information is displayed in zed itself. Hover does not work, go to definition does not work, nor any other lsp feature. They do still emit events to expert, but the responses seem to not be handled by zed.

Tested with both the automatic installation from zed-extensions/elixir and downloading the nightly binary as specified in the expert-lsp README .

// .config/zed/settings.json (on the remote machine)
{
    "lsp": {
        "expert": {
            "binary": {
                "path": "/home/<REDACTED>/.local/bin/expert_linux_amd64"
            }
        }
    }
}

Another thing to note, is that when restarting the language server (or servers) via zed, it sometimes creates multiple entries of expert. None of the logs there match the logs that expert itself creates in .expert/expert.log

Image

The logfiles accessible through dev: open language server logs are either empty or full of {:erpc, :noconnection} messages.

* (ErlangError) Erlang error: {:erpc, :noconnection}
    (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
    (xp_expert 0.1.0-57abaff) lib/expert/state.ex:171: XPExpert.State.apply/2
    (xp_expert 0.1.0-57abaff) lib/expert.ex:200: XPExpert.apply_to_state/2
    (xp_expert 0.1.0-57abaff) lib/expert.ex:139: XPExpert.handle_notification/2
    (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:528: anonymous fn/2 in XPGenLSP.loop/3
    (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
    (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:524: anonymous fn/4 in XPGenLSP.loop/3
    (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4
Received request textDocument/references before engine was initialized. Ignoring.
Received request textDocument/codeAction before engine was initialized. Ignoring.
Received request textDocument/codeAction before engine was initialized. Ignoring.
Received request textDocument/hover before engine was initialized. Ignoring.
Received request textDocument/codeAction before engine was initialized. Ignoring.
Received request textDocument/codeAction before engine was initialized. Ignoring.
Received request textDocument/definition before engine was initialized. Ignoring.

Steps to reproduce:

  1. Update zed, update elixir extension
  2. Open remote directory
  3. Wait for expert to download
  4. Try go to definition or hover

Expected Behavior:
It should work
Actual Behavior:
It does not work

Zed Version and System Specs

Zed: v0.201.6 (Zed)
OS: macOS 15.5.0
Memory: 16 GiB
Architecture: aarch64

Remote machine uname -a

Linux devbox 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions