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.
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.
Just wanted to mention I still didn’t get this set up as well as I’d like. Although the language-server is running, I don’t have auto-completion working yet, and the configuration for options you need to provide to nvim-lspconfig are quite overwhelming. I just asked a question over on Stack Overflow about how to get this set up. I’m hoping somebody will spell it out before I eventually get around to working it all out!
I started writing a quick start guide (as mentioned here) but ran into issues with lspconfig too, so ended up installing Spacevim, which works but feels slower than Spacemacs (so I uninstalled it). The reason I wanted to use Neovim is because I wanted something that felt really snappy!
So currently I am leaning towards Doom Emacs - it’s much easier to set-up, feels pretty solid, and Emacs actually has some really nice features (as mentioned in this DT thread). People (or at least the person in that vid) says that once you know the basics of Vim then it’s a good time to transition to Emacs in Evil mode (i.e Doom Emacs or Spacemacs).
I’d still be interested in trying to get a working ‘fast’ Neovim set up tho… perhaps we can start a thread in members-only to work on putting together a step-by-step guide?
After months of head-scratching and procrastinating over getting nvim-lspconfig set up property, I set up coc.nvim this morning in a couple of hours and it all works magically. Most of the defaults were what I wanted, and I only had to add about 5 lines of config. :h coc-nvim has all the documentation you need. It was also only a couple of commands to get language servers working with with json, typescript, etc. too. I wish I’d started with coc.nvim from the beginning!
Also: I tend to run two buffers side-by-side, and the way warnings are displayed with the built-in lsp support is that they are appended to the end of the line - often falling of the screen. coc.nvim’s implementation shows the warnings in a popup when you focus on them, which works better. The native version is probably configurable, but coc.vim’s defaults worked well for me.