Official Elixir Language Server team has been announced

Had an idea for a LSP feature (happy to redirect it somewhere else if this thread isn’t the right forum):

Would it be possible to provide auto-complete when adding something to a pipeline, based on the type/structure of the value being piped in?

For example, if I type [1, 2, 3] |>, it’d be cool if a dropdown pops up giving me suggested functions from the current scope that take a list as the first argument. Feel like this would help a lot for discoverability and save me from needing to remember whether a function I’m looking for is defined on “List” or “Enum” or some other module.

I think that list will be far too long to be useful.

GitHub Copilot sort of does that in a way that is both worse and better than the proposal.

  • Worse in that it doesn’t really know the types and possible values as a deterministic compiler.

  • Better in that it suggests based on context and likelihood, so suggests common idioms both community-wide and possibly project/file-specific.

Other LLM coding tools probably give a similar experience.

For the complete list, I also think it is unfortunately too long to be useful, unless there’s a good ranking mechanism to show us what we are more likely to want in the context (in which case we’re back to LLM territory, perhaps?).

If the objective is ranking a finite list of functions, I wonder whether an LLM would be overkill? Would be interesting if you could train a narrower model & make it small/light enough to run on-device, and and maybe even ship with the LSP itself.

Though I imagine that would complicate installation.

Any update on the progress?
According to this comment, the new lsp should be available under the elixir-lang org - I can’t see any such repo.

That comment says it will be available there when it’s launched. It’s not launched yet. I’ve got no idea about a timeline.

2 Likes

They are baking :star_struck:

18 Likes

Is the idea to support LSP only? Would DAP be considered in the future roadmap as well?
Would be nice to be able to use breakpoints and such for debugging.

1 Like

The language server would implement LSP, and a debugger would implement DAP. They’d be different projects.

The BEAM has really good debugging capabilities, so you may be able to wrap that in DAP today!

This LS could possible one day grow to also be a debugger, but there’s no need to wait for that.

4 Likes

We have not seen updates in a while. I wonder how it’s going.

2 Likes

I have had the same discussion with @mhanberg yesterday.

The essence of the discussion is, that there is no concrete ETA, but at least they are “rather close to making the repo public”.

I missed to squeeze a definition of “rather close” out of him though :wink:

17 Likes

The readme on expert-lsp.org seems to be about Tableau, something with templates. I am confused. Does anyone know where the official language server is?

The repo in the post you quoted is the repo for the website, so indeed not the lsp itself.

The repo for the lsp is this one:

1 Like

It’s confusing though as it’s the first result in search engines.

1 Like

Thanks, I’ve put in a pull request with links to the website and the repository of the LSP itself.