elixir-lsp / coc-elixir

Elixir language server extension based on elixir-ls for coc.nvim
MIT License
168 stars 11 forks source link

Server fails to start #1

Closed johnhidey closed 5 years ago

johnhidey commented 5 years ago

Language server keeps shutting itself down. Appears to be related to coc-elixir cause all the other extensions which I have installed for coc seem to work just fine.

I have also tested with just coc-elixir installed by itself to ensure not conflicts.

coc-elixir

Vim version: 8.1.1244 OS: Linux Debian 9 (Stretch) Elixir version: 1.9.0 and also tried 1.8.2

amiralies commented 5 years ago

Can you try manual elixir ls setup with coc.nvim and see if it works?

klingberg commented 5 years ago

I have the same issue. I can confirm that a manual setup with elixir-ls works.

amiralies commented 5 years ago

Ive added an option (elixir.pathToElixirLS) in 7b2f8cc0efd93628e81798c1f91145188b2ba6b0 to specify custom path to elixir-ls, build your own version of elixir ls and use this option, i think it will work.

terenceponce commented 5 years ago

For people who are still confused and want direct instructions on how to make this plugin work:

  1. Do the following commands:
git clone https://github.com/JakeBecker/elixir-ls.git ~/.elixir-ls
cd ~/.elixir-ls
mix deps.get && mix compile && mix elixir_ls.release -o release
  1. Create or update your ~/.vim/coc-settings.json file and add this line:
{
  "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh"
}

Doing the above instructions should make this plugin work with CoC.

There seems to be a problem with this plugin and the latest stable release of CoC which is why I had to do these steps on a fresh Mac.

jordelver commented 5 years ago

@terenceponce it would be great if these instructions were in the README.md. Could you create a quick PR? I can put a PR together if you don't have time :)

terenceponce commented 5 years ago

@jordelver Yeah, sure. I'll make a PR for this.

jordelver commented 5 years ago

Thank you