vimtricks.wiki Concise Vim tricks, one at a time.

How do I run a targeted health check for a specific Neovim plugin or module to diagnose issues?

Answer

:checkhealth {module}

Explanation

:checkhealth {module} runs the health check only for the specified module, making it much faster than the full :checkhealth which interrogates every registered plugin and system component. It is the quickest way to diagnose a broken LSP setup, a missing external dependency, or a misconfigured plugin.

How it works

  • {module} — the Lua module path of the health provider (e.g., telescope, mason, vim.lsp)
  • Neovim locates the file lua/{module}/health.lua (or autoload/{module}/health.vim for older plugins) and calls its check() function
  • Results are shown in a read-only split buffer with ✅ OK, ⚠️ WARN, and ❌ ERROR items
  • You can search the output with / and jump between sections with ]] and [[

Example

:checkhealth vim.lsp
:checkhealth telescope
:checkhealth mason
:checkhealth nvim-treesitter
:checkhealth vim.treesitter

To check multiple modules at once, separate them with a space:

:checkhealth vim.lsp mason telescope

Tips

  • Built-in modules include vim.lsp, vim.treesitter, provider.python3, provider.ruby, and vim.health
  • Use :checkhealth with no argument only when you need a full system audit — it loads every plugin and can be slow
  • Plugins register their own health checks by creating lua/{name}/health.lua with a check() function using vim.health.ok(), vim.health.warn(), and vim.health.error()
  • If a plugin lacks a health check, :checkhealth plugin-name will simply report nothing found

Next

What is the difference between the inner word (iw) and inner WORD (iW) text objects in Vim?