Nvim :help pages, generated
from source
using the tree-sitter-vimdoc parser.
:checkhealth
:che :checkhealth
:che[ckhealth] Run all healthchecks.
E5009
Nvim depends on $VIMRUNTIME, 'runtimepath' and 'packpath' to
find the standard "runtime files" for syntax highlighting,
filetype-specific behavior, and standard plugins (including
:checkhealth). If the runtime files cannot be found then
those features will not work.
{plugins}
Run healthcheck(s) for one or more plugins. E.g. to run only
the standard Nvim healthcheck::checkhealth nvim
require("foo.health").check() interface)::checkhealth foo bar
vim.lsp and vim.treesitter::checkhealth vim.lsp vim.treesitter
:checkhealth vim*
{name}) vim.health.start()
Starts a new report. Most plugins should call this only once, but if
you want different sections to appear in your report, call this once
per section.
{msg}) vim.health.info()
Reports an informational message.
{msg}) vim.health.ok()
Reports a "success" message.
{msg} [, {advice}]) vim.health.warn()
Reports a warning. {advice} is an optional list of suggestions to
present to the user.
{msg} [, {advice}]) vim.health.error()
Reports an error. {advice} is an optional list of suggestions to
present to the user.
check()
function.
lua/foo/health.lua, replacing "foo" in the path
with your plugin name:local M = {}
M.check = function()
vim.health.start("foo report")
-- make sure setup function parameters are ok
if check_setup() then
vim.health.ok("Setup is correct")
else
vim.health.error("Setup is incorrect")
end
-- do some more checking
-- ...
end
return M