(Neo)vim and language servers

There is a thread about vim already, but I wanted to start one specifically about the language server.

What configuration do people use for integrating elixir-ls in vim? Are the integrations worth using?

Specifically, the elixir-ls readme suggests three options:

  1. ALE
  2. elixir-lsp/coc-elixir
  3. vim-lsp

I’ve already read Mitchell Hanberg (ALE), Hauleth (vim-lsp) and David Bernheisel (coc-elixir)'s blog posts - but they are from 2018, 2019 and 2020 respectively, and all recommend different implementations. I was wondering if there have been more developments in the last few years that may change the recommendations, and if there is any de-facto standard?

Personally I was thinking of trying vim-lsp, but thought I’d check for a consensus before I go down the rabbit hole.

1 Like

If you’re using neovim, the neovim lsp is recommended since it’s built-in lsp integration for neovim since 0.5. It’s quite faster than the list above since it’s written in C + some Lua code (i believe). You just to install the neovim-lspconfig GitHub - neovim/nvim-lspconfig: Quickstart configurations for the Nvim LSP client to pre config lsp server that you want to use, elixir-ls already included.

But if you’re prefer vim-lsp, vim-lsp-settings GitHub - mattn/vim-lsp-settings: Auto configurations for Language Server for vim-lsp is recommended.


Thanks wingyplus - no preference! I will check out neovim-lspconfig.

Another nice thing with using the built-in lsp client is that it integrates nicely with telescope , which makes it easy to navigate through documents/workspace symbols/diagnostics. Of course if you don’t use/like telescope, then it’s not really relevant.

Apart from that, if you’re ok with experimental features, nvim-treesitter is a good addition to the setup, but it does require to work with nvim HEAD, which hasn’t eaten any of my code up until now.

The only issue I faced with this setup, is I forgot to set the terminal to bash in my init.lua, and fish (my main terminal) doesn’t play well at all with vim/nvim and can render everything crippling slow.

1 Like