Hacker News new | past | comments | ask | show | jobs | submit login

I like both COC and CMP (native).

COC is way easier to set up and the default config is fine.

CMP is lighter and more configurable, and it works really nicely with luasnip (my snippet engine of choice).

Under the hood they both use the same LSPs, but COC pulls them down and sets them up for you.




Theoretically, we could build a plugin that does all automatic setup like COC, but then uses the built-in LSP to do the actual work. nvim-lspconfig already does part of this job - configuring the LSP, as long as the server is already installed. Personally, I prefer the system package manager taking care of the servers, rather than yet another package maintenance system.


lspconfig maintainer here, minor info dump:

Lspconfig currently has 3 parts, the default settings for the servers, an implicit project detector to trigger when to launch the servers (conditioned on filetypes and some patterns), and the infrastructure to manage launching/shutting down/attaching buffers to servers as you open files within the same project.

Eventually we'd like parts 2 & 3 to be in core as a "projects" module, leaving separate "project patterns" and "server settings" as mostly metadata containing repositories.

That would open the door for third party plugins to create customized project templates which map keybindings, set formatexpr, pass custom server settings, etc. similar to how coc.nvim has coc-pyright, coc-gopls, etc. These plugins could also handle installing language servers automatically should they choose to offer that.

There's also nvim-lsp-installer, but I really don't like the approach it takes of hijacking lspconfig's setup.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: