brainlid

brainlid

Podcast: Thinking Elixir 161 - Lexical LS and Elixir Dev UX

Episode 161 of Thinking Elixir. Language Servers underpin the language specific support we rely on in modern code editors. Lately, there have been new efforts in this area in the Elixir community. We talk with Steve Cohen about his project Lexical LS to learn about his new Elixir Language Server, how long he’s been at it, and what it can do today. We learn about some of the technical challenges when creating a tool like this, and why there’s still room for new projects in this area. Steve explains how Lexical LS is architected and that it is a goal to be easy to contribute to and work on the Lexical project itself. Time to give it a try!

Most Liked

stevensonmt

stevensonmt

This project just popped up on github as a recommendation for me. It looks interesting and I’ll definitely check out the podcast. I’m curious if anyone has used it with vim and if so, how the setup went.

heatmiser

heatmiser

I am currently struggling to get this installed myself. Keeps crashing on initial load on do_boot.

EDIT:

Adhering to the “lowest common denominator” caveats in the README of Elixir and Erlang versions fixed this for me.

soup

soup

I found it simplest to build my own binary like headmiser says, other wise it wouldn’t boot and swapping project versions backwards seemed more fraught than just building it. Building it was no drama, though the readme says build/... instead of _build/... for the output dir.

It does not support textDocument/hover (ie “show docs under cursor”) which I use quite a lot. I had a look at adding support but it seems you need to do more than add the defrequest "textDocument/hover" to Lexical.Protocol.Requests to let clients know the server capabilities, then I had to put it down and go back to work :slight_smile:

The completions seemed to be about as quick as ElixirLS.

Function picking from the completion menu are a bit different. ELS shows the full argument spec – including pattern matches (eg: fill(%S{} = s) plus the function @doc, where as LEX only shows the variable names (fill(s), no @doc, no patterns). However when selecting the function, ELS inserts fill(|) while LEX inserts fill(|s|) which is nice.

I have nvim setup to only show LSP/etc when I exit insert mode so I dont find the “real time” nature distracting, others might not enjoy it.

I think the formatter seemed to respect .formatter.exs, meaning it didn’t stick parens around ecto model fields which I think not possible with ELS last time I checked.

Inline credo sounds cool but it failed to build (when built by Lexical on start up), possibly because I self built Lexical.

Will probably check back in on it in a few months, though I have no real complaints with ElixirLS beyond the formatting thing, but I just run !mix format % instead.

Where Next?

Popular in Podcasts Top

wolf4earth
The Elixir Mix panel takes the helm to talk about helping onboard and transition new developers onto an Elixir team. They discuss helping...
New
brainlid
In episode 54 of Thinking Elixir, Lucas San Román explains his library Sourceror and how it was created to solve some AST parsing limitat...
New
brainlid
Episode 125 of Thinking Elixir. While hearing how Elixir is being used in the Royal Bank of Canada’s Capital Markets, we learned a lot of...
New
brainlid
ThinkingElixir 080: Waffle Making with Boris Kuznetsov In episode 80 of Thinking Elixir, we talk with Boris Kuznetsov to learn about the...
New
brainlid
Episode 118 of Thinking Elixir. Honoring a user’s “right to be forgotten” is not only respectful, but it may be a legal requirement. Clém...
New
wolf4earth
David Yamnitsky joins the mix to discuss tangram.dev and how to use it to add Machine Learning features to your Elixir applications. He ...
New
brainlid
In episode 106 of Thinking Elixir, we learn how the SonicPi project has been letting people live code musical performances for years. Sam...
New
brainlid
Episode 137 of Thinking Elixir. After covering the week’s news, we talk about upgrading our apps to Phoenix 1.7.0 and what the experience...
New
brainlid
In episode 87 of Thinking Elixir, José Valim returns to continue with part 2 of our 5 part series as we count down to the 10 year anniver...
New
brainlid
Episode 129 of Thinking Elixir. Tracking, analyzing and visualizing time series data can add a lot of business value to a project! We met...
New

Other popular topics Top

lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
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 39297 209
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
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

We're in Beta

About us Mission Statement