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
Ben Moss joins the Mix to discuss Event Sourcing and CQRS in Elixir. Event sourcing is the practice of logging data across logged series ...
New
brainlid
In episode 72 of Thinking Elixir, we talk with Wiebe-Marten Wijnja about his project TypeCheck that provides a new kind of runtime type c...
New
brainlid
Episode 112 of Thinking Elixir. Google Chrome extension that displays a LiveView and integrates with a web page like Gmail? Steve Bussey ...
New
brainlid
In episode 73 of Thinking Elixir, we talk with Paul Copplestone, founder and CEO of Supabase. Supabase leverages the power of Elixir, Pos...
New
brainlid
In episode 65 of Thinking Elixir, we talk with Elixir Core Team Member Aleksei Magusev about how he got involved in Elixir, what it’s lik...
New
brainlid
We go deeper on the Sobelow library, a security-focused static analysis tool for Elixir and Phoenix apps. We talk with Griffin Byatt, the...
New
brainlid
In episode 109 of Thinking Elixir, we talk about a new library in the Nx ecosystem under active development called NxSignal by Paulo Vale...
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
News covers the new Phoenix.Template project, upcoming Nx work for Elixir using multiple GPUs, benefits of Elixir as seen by new people l...
New
brainlid
In this episode we dive into the exciting release of Elixir 1.17.0-rc.1 and other news from the community. Our main segment features an i...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New

We're in Beta

About us Mission Statement