Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: make searching for ASDF optional #1157

Open
Trevoke opened this issue Jan 24, 2025 · 1 comment
Open

Feature request: make searching for ASDF optional #1157

Trevoke opened this issue Jan 24, 2025 · 1 comment

Comments

@Trevoke
Copy link
Member

Trevoke commented Jan 24, 2025

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.

@lukaszsamson
Copy link
Collaborator

I'm curious if https://github.com/elixir-lsp/elixir-ls?tab=readme-ov-file#local-setup is not suitable in your case. You can place your custom hacks in your local setup script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants