Elixir language server extension based on elixir-ls for coc.nvim.
-
Make sure you've got
elixirandmixavailable in$PATH. -
Inside (neo)vim run this command:
:CocInstall coc-elixir
- Go to definition support
- Code completion
- Inline diagnostic (Build errors and warning)
- Documentation on hover
- Smart closing of code blocks
- Code formatter
If, for some reason, the language server fails to start, you can try doing a manual installation of ElixirLS to fix the problem.
Start by building a binary of ElixirLS from its source:
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
Afterwards, create or update your ~/.vim/coc-settings.json file and add this line:
{
"elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh"
}Doing these steps should make this plugin work with CoC.
MIT