explaingit

neovim/nvim-lspconfig

13,635LuaAudience · developerComplexity · 3/5Setup · moderate

TLDR

nvim-lspconfig is a Neovim plugin with pre-built configurations for hundreds of language servers, giving your editor autocomplete, error highlighting, and go-to-definition without manual setup for each language.

Mindmap

mindmap
  root((nvim-lspconfig))
    What It Does
      Pre-built LSP configs
      Language server setup
      Auto file type matching
    Editor Features
      Autocomplete
      Error highlighting
      Go to definition
    Setup
      Install language server
      Enable in init.lua
      Health check tool
    Coverage
      Hundreds of languages
      Community maintained
      Neovim 0.11 required
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add Python autocomplete and error highlighting in Neovim by enabling the Pyright language server with one line of config.

USE CASE 2

Set up language intelligence, autocomplete, go-to-definition, type errors, for any of hundreds of programming languages in Neovim.

USE CASE 3

Migrate an older Neovim config from the deprecated require('lspconfig') pattern to the new vim.lsp.enable() approach.

Tech stack

LuaNeovimLSP

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Neovim 0.11 or newer and each language server installed separately on your machine before enabling it.

Open source, specific license terms are not described in the repository explanation.

In plain English

nvim-lspconfig is a plugin for Neovim, a programmable text editor popular with developers. It provides ready-made configuration files that tell Neovim how to talk to "language servers", which are separate background programs that understand a specific programming language. A language server is what gives your editor features like error highlighting, auto-complete suggestions, and jump-to-definition, without the editor itself needing to understand every language. Without nvim-lspconfig, you would need to write the setup details for each language server yourself: which command to run, which file types it handles, how to find the root of your project. This plugin ships with that information pre-written for hundreds of servers, so you only need to install the server and tell Neovim to turn it on. The current way to use the plugin is with Neovim version 0.11 or newer. You install a language server on your machine, add a single line like vim.lsp.enable("pyright") to your Neovim config file for Python, and Neovim will activate that server whenever you open a matching file. The plugin automatically finds the right configuration for that server and applies it. One thing to be aware of: an older style of using this plugin, through require("lspconfig"), is now deprecated and will eventually stop working. If you have an older Neovim config that uses that pattern, the README includes short migration instructions for switching to the new approach. The configurations themselves are maintained by the community rather than a dedicated paid team, so quality varies by server. If something does not work, the recommended first step is running the built-in health check command inside Neovim, which reports whether the server is installed, whether it started, and whether it attached to the file you opened.

Copy-paste prompts

Prompt 1
I use Neovim 0.11 and want TypeScript language support with nvim-lspconfig. What do I install and what do I add to my init.lua?
Prompt 2
My language server is not attaching in Neovim. Walk me through running the built-in health check command and reading the output.
Prompt 3
I have an older Neovim config that uses require('lspconfig').pyright.setup({}). How do I migrate it to the new vim.lsp.enable() pattern?
Prompt 4
Help me configure nvim-lspconfig so Python uses Pyright and JavaScript uses the TypeScript language server, each activating only for the right file types.
Open on GitHub → Explain another repo

← neovim on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.