xavaav

xavaav

Emacs Elixir lsp-mode broken

Hi All,

I’m not sure what happened but my Elixir LSP (in emacs) has stopped working ( I haven’t done anything to my .emacs file), it tries to restart with the error:

Server elixir-ls:2340/starting exited (check corresponding stderr buffer for details). Do you want to restart it? (y or n)

but then immediately stops working. I am using Elixir 1.16.0 and Erlang/OTP 26. Checking stderr per the recommendations I’m met with

Running /Users/canaan/.emacs.d/.cache/lsp/elixir-ls/launch.sh
Preffered shell is zsh, relaunching
Looking for ASDF install
ASDF not found
Looking for rtx executable
rtx not found
Installing ElixirLS release v0.16.0
Running in /Users/USER/Desktop/Workbench
Mix.install failed with ** (ArgumentError) unknown keys [:stop_started_applications] in [force: false, start_applications: false, stop_started_applications: false, consolidate_protocols: false], the allowed keys are: [:config, :config_path, :consolidate_protocols, :elixir, :force, :lockfile, :runtime_config, :start_applications, :system_env, :verbose]
    (elixir 1.16.0) lib/keyword.ex:359: Keyword.validate!/2
    (mix 1.16.0) lib/mix.ex:819: Mix.install/2
    /Users/USER/.emacs.d/.cache/lsp/elixir-ls/installer.exs:526: ElixirLS.Installer.install/1
    /Users/USER/.emacs.d/.cache/lsp/elixir-ls/installer.exs:543: ElixirLS.Installer.install_with_retry/0
    /Users/USER/.emacs.d/.cache/lsp/elixir-ls/quiet_install.exs:14: (file)
    (elixir 1.16.0) src/elixir_compiler.erl:67: :elixir_compiler.dispatch/4
    (elixir 1.16.0) src/elixir_compiler.erl:52: :elixir_compiler.compile/4
    (elixir 1.16.0) src/elixir_compiler.erl:39: :elixir_compiler.maybe_fast_compile/3

I appreciate if anyone has seen this error before and has any solutions. I’ve installed asdf, but it was working just fine before, is there some chance it’s a simple error and I’m not launching the server from the right directory? And if that is the case what is the simple fix?

Thanks again!

Marked As Solved

xavaav

xavaav

Hi All!

In case anyone find this and is stuck in the future, I’ve solved it for my particular case.

Instead of using the 'exec-path, moving the files from the latest lsp (18 in this case) to the ~/.emacs.d/.cache/lsp/elixir-ls/ solved the problem.

Just make sure to remove conflicting files. (I’m sure there is a more elegant way to do this, but this solves it).

Also Liked

tpdly

tpdly

I had the same problem, thanks for the solution.
Very strange that emacs insists on using the cache location. I tried deleting the .emacs.d/.cache/lsp/elixir-ls before, and somehow it just pulled the same thing from github into that cache folder-- some version 0.16 of elixir-ls. Good idea to just put an updated build there.

Where Next?

Popular in Questions Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
LegitStack
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it. I’m very interested in Elixir,...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
idi527
I’ve been re-reading swift book again and noticed that multiline strings there don’t have a trailing line break, unlike in elixir iex(2)...
New

Other popular topics Top

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
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
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New

We're in Beta

About us Mission Statement