VonHeikemen/lsp-zero.nvim

website github github
language-server-protocollspneovimnvim
stars 3,511
issues 13
subscribers 15
forks 91
CREATED

2022-02-20

UPDATED

5 days ago


LSP Zero

Collection of functions that will help you setup Neovim's LSP client, so you can get IDE-like features with minimum effort.

Out of the box it will help you integrate nvim-cmp (an autocompletion plugin) and nvim-lspconfig (a collection of configurations for various language servers). So a minimal config can look like this.

require('lsp-zero')
require('lspconfig').intelephense.setup({})

With this code when intelephense (a language server for PHP) is active you'll get all the features Neovim offers by default plus autocompletion. See demo in asciinema.

How to get started

If you are new to Neovim and you don't have a configuration file (init.lua) follow this step by step tutorial.

If you know how to configure Neovim go to the Getting started page in the documentation.

Also consider nvim-lspconfig works fine without lsp-zero. And you can setup nvim-cmp by yourself. I wrote a blog post that shows how to do it: You might not need lsp-zero.

Documentation

You can browse the documentation at lsp-zero.netlify.app/v3.x

If you need any help

Feel free to open a new discussion in this repository. Or join the chat #lsp-zero-nvim:matrix.org.

If you have problems with a language server read this guide: What to do when the language server doesn't start?

If you want to migrate from a previous version to the v3.x branch, follow one of these guides:

When asking for help for a specific language

One thing you should know when asking for help online: asking the question "how to configure [random language] with lsp-zero?" is not going to give you the results you want. You probably want to ask "how to configure the language server for [random language] using nvim-lspconfig?" That will give you better results because nvim-lspconfig is the plugin that configures the language servers.

Quickstart (for the impatient)

If you are not that impatient, I recommend reading the Getting started page.

But for those of you that just want to copy/paste, here are some templates you can use.

Support

If you find this tool useful and want to support my efforts, buy me a coffee ☕.

buy me a coffee