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. 1. Check what Neovim sees

    1. Open a file of the affected language
    2. Run :checkhealth vim.lsp (:LspInfo is an alias)
    3. Look for the server under enabled configs and any 'cmd not executable' errors
  2. 2. Install the server and make sure it's on PATH

    1. Install it via :Mason or your package manager (e.g. npm i -g pyright)
    2. If the binary lives elsewhere, set cmd: vim.lsp.config('jdtls', { cmd = { '/path/to/jdtls' } })
  3. 3. Switch to vim.lsp.enable()

    1. Remove require('lspconfig').<server>.setup{} calls
    2. Add vim.lsp.enable('<server>') to init.lua (keep nvim-lspconfig installed for the server definitions)
    3. Restart Neovim
  4. 4. Add a root marker

    1. Make sure the project has .git or the server's root file (package.json, pyproject.toml, go.mod)
    2. Or override root_markers in vim.lsp.config()
  5. 5. Upgrade Neovim

    1. Run nvim --version; current nvim-lspconfig needs 0.11.3+
    2. 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