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. Migrate each server
- Replace require('lspconfig').pyright.setup({ settings = {...} })
- with vim.lsp.config('pyright', { settings = {...} })
- then add vim.lsp.enable('pyright')
2. Keep nvim-lspconfig installed
- It still ships the default server configs (lsp/<server>.lua) that vim.lsp.enable() uses
- Only stop calling its setup() framework
3. Verify
- Restart Neovim and open a file
- 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
- Neovim LSP Not Working or Not Attaching
- Neovim Treesitter Highlighting Not Working
- Neovim Clipboard Not Working (clipboard: No provider)
- Neovim Colors Wrong in tmux
- Neovim Escape Key Delay in tmux
- Mason Failed to Install Language Server in Neovim
- Why Is Neovim So Slow? (Startup Lag and Large Files)
- Neovim Autocomplete Not Working (blink.cmp / nvim-cmp)
- Neovim Config Broke After Updating to 0.12
- Neovim Python Provider Not Working (pynvim)