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

it may fail when using asdf and other versioning tools #47

Open
jalberto opened this issue Feb 2, 2021 · 2 comments
Open

it may fail when using asdf and other versioning tools #47

jalberto opened this issue Feb 2, 2021 · 2 comments

Comments

@jalberto
Copy link

jalberto commented Feb 2, 2021

I work in different elixir projects that use different erlang and elixir versions, to manage this I use asdf so each project has a local file to define the correct versions and the system versions also come into play.

Is there a way to make elixir-lsp aware of this? so it rebuilds a new version when necessary with the correct combination.

@wulymammoth
Copy link

I use asdf as well...

I think the way to manage this is using "workspace" configuration:
https://github.com/neoclide/coc.nvim/wiki/Using-the-configuration-file#configuration-file-resolve

What I'm gleaning is that you want to specify a different coc-settings.json depending on project

According to the README, you can specify where the pre-compiled language server binary is:

{
  "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh"
}

I'd consider just just dumping it in my home directory under: ~/.elixir-ls/release/<version number>/language_server.sh

Instructions on how to build a language server for each version of Elixir that you're on can be found in the LS repo's README: https://github.com/elixir-lsp/elixir-ls

@dylan-chong
Copy link

So what fixed it for me was i already had set up this for a previous version of elixir
https://github.com/elixir-lsp/coc-elixir#troubleshooting

I had to make sure the global version of elixir and erlang matched the version in the project,
delete ~/.elixir-ls
then run the commands in the readme link above to recompile the project

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

3 participants