elixir-lsp / elixir-lsp/elixir-ls

Feature request: make searching for ASDF optional

Open
#1,157 20 comments 7 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
1.8k
Forks
227
Avg merge
31m
Merged PRs (30d)
2

Description

I'm in an environment where we use Nix very heavily to override everything, and while I do have asdf installed, it turns out to, most of the time, not be the versions of Elixir/Erlang that I need.

I fixed it locally by changing this line in `launch.sh` to have a bogus path to search for ASDF :

`ASDF_DIR=${ASDF_DIR:-"${HOME}/.asdfx"}`

There may be a larger decision over whether elixir-ls should do this at all, or whether the paths to the executable should be assumed to be known in the environment at launch time.

In emacs for instance, for Nix reasons, I am using direnv which triggers nix, so I use this:
https://github.com/purcell/envrc

Basically it runs direnv for a project when I open the first buffer (and it reuses the values for each subsequent open buffers), and that gives me things like a custom PATH for each project, so emacs knows the correct version of elixir and erlang for the given buffer.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.