Neovim LSP Not Working or Not Attaching
Workaround available Windows, macOS, Linux Updated October 21, 2026
Quick answer
Usually the language server isn't installed/on PATH, the project has no root marker, or the config still uses the deprecated lspconfig setup(). Run :checkhealth vim.lsp, then enable the server with vim.lsp.enable().
Most likely fix: Check what Neovim sees.
Symptoms
No diagnostics, no go-to-definition or hover; :checkhealth vim.lsp shows no active clients for the buffer.
Why it happens
- Language server binary not installed or not on the PATH Neovim sees
- No root marker (e.g. .git) so the server never starts
- Config uses require('lspconfig').X.setup{} which is deprecated on 0.11+
- nvim-lspconfig version requires Nvim 0.11.3+ and you're on an older Neovim
How to fix it
Try these in order — the most common fix is first.
1. Check what Neovim sees
- Open a file of the affected language
- Run :checkhealth vim.lsp (:LspInfo is an alias)
- Look for the server under enabled configs and any 'cmd not executable' errors
2. Install the server and make sure it's on PATH
- Install it via :Mason or your package manager (e.g. npm i -g pyright)
- If the binary lives elsewhere, set cmd: vim.lsp.config('jdtls', { cmd = { '/path/to/jdtls' } })
3. Switch to vim.lsp.enable()
- Remove require('lspconfig').<server>.setup{} calls
- Add vim.lsp.enable('<server>') to init.lua (keep nvim-lspconfig installed for the server definitions)
- Restart Neovim
4. Add a root marker
- Make sure the project has .git or the server's root file (package.json, pyproject.toml, go.mod)
- Or override root_markers in vim.lsp.config()
5. Upgrade Neovim
- Run nvim --version; current nvim-lspconfig needs 0.11.3+
- Install the latest stable release (0.12.x)
This guide also covers
- neovim lsp not working
- nvim lsp not attaching
- neovim lsp not starting
- checkhealth vim.lsp
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
- require('lspconfig') Is Deprecated Warning in Neovim
- 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)