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(orautoload/{module}/health.vimfor older plugins) and calls itscheck()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, andvim.health - Use
:checkhealthwith 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.luawith acheck()function usingvim.health.ok(),vim.health.warn(), andvim.health.error() - If a plugin lacks a health check,
:checkhealth plugin-namewill simply report nothing found