talira

nvim-lspconfig

Ready-made language server configs for Neovim's built-in LSP client

open sourceApache-2.0free

nvim-lspconfig is an Apache-2.0 collection of configurations for language servers, used by Neovim's built-in LSP client. Since Nvim 0.11 its configs live in an lsp/ directory that vim.lsp.config finds on its own, so vim.lsp.enable('pyright') is enough to start a server for its file types. The old require('lspconfig') setup framework is deprecated and will be removed, but the configs themselves are maintained by the community. It needs Nvim 0.11.3 or later.

Problems it solves

  • set up a language server in Neovim without writing its config by hand
  • get pyright or rust-analyzer working in Neovim's built-in LSP client
  • move my Neovim LSP setup off the deprecated lspconfig setup calls

Features

  • configs for many language servers, found automatically by vim.lsp.config
  • enable a server with one vim.lsp.enable call
  • root markers and file types set per server

Limitations

  • Needs Nvim 0.11.3 or later; Nvim 0.10 support is being removed.1
  • The legacy require('lspconfig') framework is deprecated and will be dropped.1
  • Configs are best-effort and supported by the community.1

Alternatives

The same job

These do what nvim-lspconfig does.

  1. AstroNvim An aesthetic, feature-rich and extensible Neovim configuration
  2. Neovim hyperextensible Vim-based text editor
  3. NvChad Blazing fast Neovim config providing solid defaults and a beautiful UI
  4. Helix Post-modern modal text editor for the terminal
  5. coc.nvim VS Code-like completion, diagnostics and language servers for Vim and Neovim
  6. LunarVim Community-driven IDE layer for Neovim, now unmaintained

Compare nvim-lspconfig with the top 3