marius95

marius95

Issues with ElixirLS: Elixir sources not found and error while running own Elixir LS Version

Hello everyone,

I have two problems with Elixir LS. In the image you can see both problems/questions. I’m using VSCode and the Elixir LS extension. The screenshot is from my Phoenix project. I’ve installed Erlang and Elixir through asdf.

image

Question 1

The last line says: Elixir sources not found and I’m wondering if it is possible to change the path in the info message? I’m not sure why the path is /home/build/elixir.

Question 2

I’m missing some intellisense features in VSCode and I was hoping to solve it with compiling Elixir LS with the same Elixir and Erlang version, I’m using. So I was following this guide: https://dragoshmocrii.com/fix-vscode-elixirls-intellisense-for-code-imported-with-use/?PageSpeed=noscript

The compilation was successful but I get a JsonRPC error while checking the Output Panel of the VSCode console. This error is already mentioned in the trouble shooting page of Elixir LS: GitHub - elixir-lsp/elixir-ls: A frontend-independent IDE "smartness" server for Elixir. Implements the "Language Server Protocol" standard and provides debugger support via the "Debug Adapter Protocol" · GitHub

Unfortunately I was unable to find a fix…

First 10 of 15 Posts Switch mode

jngcorvus

jngcorvus

Regarding question 1:
I had to clone the elixir repo into /home/builds/elixir: GitHub - elixir-lang/elixir at v1.12.3 · GitHub

inaniyants

inaniyants

for question 2 problem:

Vscode elixir introduced setting languageServerOverridePath. You could find it in vscode settings ElixirLS.
This setting can be configured per workspace, so each project will have its own elixirLS release, which is handy if you’re using asdf for elixir installation and have different elixir versions per project.

Basically, you need to download ElixirLS precompiled release for desired elixir version from here
Releases · elixir-lsp/elixir-ls · GitHub and upzip it to some directory. Then use absolute path to that directory to set languageServerOverridePath setting. Then remove .elixir_ls and _build directories in your project and restart VsCode.
Every time, when vscode elixir ls extension upgrades ElixirLS version, you’ll need to download a new release and repeat all the above.

IMO, it’s better than compiling ElixirLS manually and replacing it in vscode extensions.

lukaszsamson

lukaszsamson

ElixirLS Core Team

languageServerOverridePath may no longer be useful. Since v0.14 the extension uses Mix.install which builds and installs elixirLS using the correct elixir and OTP combo

brunoripa

brunoripa

Hey folks, a quick question: I started working on a project for Elixir 1.11 this morning; according to the support matrix I see that Elixir <= 1.12 is not supported, is that correct ? Am I missing something ? Any workaround to have this working in some way with Elixir 1.11 Otp 23 ?

Thanks in advance.

dimitarvp

dimitarvp

Elixir 1.11 is still listed as supported here: elixir/lib/elixir/pages/references/compatibility-and-deprecations.md at main · elixir-lang/elixir · GitHub

And you can use it with Erlang 21 to 23.

brunoripa

brunoripa

Thanks @dimitarvp

brunoripa

brunoripa

Ops, probably there’s been a misunderstanding, actually ElixirLS does not support Elixir versions <= 1.12:

:frowning:

dimitarvp

dimitarvp

Well, try and upgrade? Is there an obstacle?

brunoripa

brunoripa

Well, the message was there … but it’s working :sweat_smile:

dimitarvp

dimitarvp

I still wouldn’t count on that though. No good reason to hold off version upgrades IMO.

Where Next?

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
silverdr
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated! To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead. Sta...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
michallepicki
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement