serena icon indicating copy to clipboard operation
serena copied to clipboard

Use the official Elixir Expert language server instead of the deprecated NextLS

Open humberaquino opened this issue 3 months ago • 8 comments

The NextLS repo is now deprecated and marked as archived since Aug 29th 2025 because the focus has shifted to working on the official language server for Elixir: Expert.

humberaquino avatar Sep 02 '25 13:09 humberaquino

A good one for the community, can be done in a similar manner as the migration from solargraph to ruby-lsp in #535.

MischaPanch avatar Sep 02 '25 16:09 MischaPanch

@dbernazal FYI

MischaPanch avatar Sep 02 '25 16:09 MischaPanch

I can take care of this once Expert moves past the Alpha stage. Speaking with the maintainers, AFAIK, they're not quite ready for broad consumption.

dbernazal avatar Sep 02 '25 18:09 dbernazal

Sounds good, thanks! Then let's continue this issue when the new LS is more stable

MischaPanch avatar Sep 02 '25 18:09 MischaPanch

@dbernazal Does the current nextls version work? It fails to initialise in all of my project:

16:21:39.519 [error] Task #PID<0.218.0> started from #PID<0.215.0> terminating
** (KeyError) key :work_done_progress not found in: nil

If you are using the dot syntax, such as map.field, make sure the left-hand side of the dot is a map
    (next_ls 0.23.4) lib/next_ls/progress.ex:11: anonymous fn/3 in NextLS.Progress.start/3
    (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
Function: #Function<0.11992973/0 in NextLS.Progress.start/3>
    Args: []

16:23:41.411 [error] Runtime for folder test_repo failed to initialize

16:23:41.414 [debug] sent notification server -> client window/logMessage

16:23:41.414 [info] The runtime for test_repo has successfully shut down.

16:23:41.415 [error] ** (KeyError) key :show_message not found in: nil

If you are using the dot syntax, such as map.field, make sure the left-hand side of the dot is a map
    (next_ls 0.23.4) lib/next_ls.ex:1287: NextLS.handle_info/2
    (gen_lsp 0.11.0) lib/gen_lsp.ex:573: anonymous fn/2 in GenLSP.loop/3
    (telemetry 1.3.0) /Users/runner/work/next-ls/next-ls/deps/telemetry/src/telemetry.erl:324: :telemetry.span/3
    (gen_lsp 0.11.0) lib/gen_lsp.ex:572: anonymous fn/4 in GenLSP.loop/3
    (gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in GenLSP.attempt/4
    (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2

DominicMCN avatar Sep 10 '25 14:09 DominicMCN

Same, it is not usable in Elixir projects at the moment.

Wijnand avatar Nov 09 '25 06:11 Wijnand

Some issues with the current support for Elixir were likely solved in #752. @dbernazal - maybe you can comment here on what the problem was?

Keeping this issue open until we actually switch to Elixir Expert

MischaPanch avatar Nov 13 '25 08:11 MischaPanch

I'm not exactly sure how I missed this but this code path will get hit when you have an issue with your deps. NextLS was checking the capabilities but we hadn't specified the window map when initializing NextLS.

dbernazal avatar Nov 13 '25 13:11 dbernazal