require('lspconfig') Is Deprecated Warning in Neovim

Workaround available Windows, macOS, Linux Updated October 21, 2026

Quick answer

On Neovim 0.11+, the legacy nvim-lspconfig setup() framework is deprecated in favor of built-in vim.lsp.config() and vim.lsp.enable(). Replace each setup{} call with vim.lsp.config + vim.lsp.enable.

Most likely fix: Migrate each server.

Symptoms

A deprecation warning about require('lspconfig') on startup, or servers that stopped attaching after updating nvim-lspconfig.

Why it happens

  • Config written for Neovim 0.10 or older
  • Updated nvim-lspconfig that deprecates its framework
  • Distro or tutorial code still calling lspconfig.X.setup()

How to fix it

Try these in order — the most common fix is first.

  1. 1. Migrate each server

    1. Replace require('lspconfig').pyright.setup({ settings = {...} })
    2. with vim.lsp.config('pyright', { settings = {...} })
    3. then add vim.lsp.enable('pyright')
  2. 2. Keep nvim-lspconfig installed

    1. It still ships the default server configs (lsp/<server>.lua) that vim.lsp.enable() uses
    2. Only stop calling its setup() framework
  3. 3. Verify

    1. Restart Neovim and open a file
    2. Run :checkhealth vim.lsp to confirm the client is attached

This guide also covers

  • lspconfig deprecated
  • require lspconfig deprecated neovim
  • vim.lsp.enable vs lspconfig
  • neovim 0.11 lsp config

Still not working?

If Neovim keeps failing, you're not alone. See every Neovim problem users report or the alternatives people switch to.

Other Neovim errors