aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/pi_health.txt
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-29 21:52:58 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-29 21:52:58 +0000
commit931bffbda3668ddc609fc1da8f9eb576b170aa52 (patch)
treed8c1843a95da5ea0bb4acc09f7e37843d9995c86 /runtime/doc/pi_health.txt
parent142d9041391780ac15b89886a54015fdc5c73995 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-userreg.tar.gz
rneovim-userreg.tar.bz2
rneovim-userreg.zip
Merge remote-tracking branch 'upstream/master' into userreguserreg
Diffstat (limited to 'runtime/doc/pi_health.txt')
-rw-r--r--runtime/doc/pi_health.txt28
1 files changed, 14 insertions, 14 deletions
diff --git a/runtime/doc/pi_health.txt b/runtime/doc/pi_health.txt
index 5ba5d1beef..bcc933d8b2 100644
--- a/runtime/doc/pi_health.txt
+++ b/runtime/doc/pi_health.txt
@@ -12,7 +12,7 @@ any other environment conditions that a plugin might care about. Nvim ships
with healthchecks for configuration, performance, python support, ruby
support, clipboard support, and more.
-To run all healthchecks, use: >
+To run all healthchecks, use: >vim
:checkhealth
<
@@ -21,7 +21,7 @@ Plugin authors are encouraged to write new healthchecks. |health-dev|
==============================================================================
Commands *health-commands*
- *:che* *:checkhealth* *:CheckHealth*
+ *:che* *:checkhealth*
:che[ckhealth] Run all healthchecks.
*E5009*
Nvim depends on |$VIMRUNTIME|, 'runtimepath' and 'packpath' to
@@ -32,17 +32,17 @@ Commands *health-commands*
:che[ckhealth] {plugins}
Run healthcheck(s) for one or more plugins. E.g. to run only
- the standard Nvim healthcheck: >
+ the standard Nvim healthcheck: >vim
:checkhealth nvim
<
To run the healthchecks for the "foo" and "bar" plugins
(assuming they are on 'runtimepath' and they have implemented
- the Lua `require("foo.health").check()` interface): >
+ the Lua `require("foo.health").check()` interface): >vim
:checkhealth foo bar
<
To run healthchecks for Lua submodules, use dot notation or
"*" to refer to all submodules. For example Nvim provides
- `vim.lsp` and `vim.treesitter`: >
+ `vim.lsp` and `vim.treesitter`: >vim
:checkhealth vim.lsp vim.treesitter
:checkhealth vim*
<
@@ -52,22 +52,22 @@ Functions *health-functions* *vim.health*
The Lua "health" module can be used to create new healthchecks. To get started
see |health-dev|.
-vim.health.report_start({name}) *vim.health.report_start()*
+vim.health.start({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.
-vim.health.report_info({msg}) *vim.health.report_info()*
+vim.health.info({msg}) *vim.health.info()*
Reports an informational message.
-vim.health.report_ok({msg}) *vim.health.report_ok()*
+vim.health.ok({msg}) *vim.health.ok()*
Reports a "success" message.
-vim.health.report_warn({msg} [, {advice}]) *vim.health.report_warn()*
+vim.health.warn({msg} [, {advice}]) *vim.health.warn()*
Reports a warning. {advice} is an optional list of suggestions to
present to the user.
-vim.health.report_error({msg} [, {advice}]) *vim.health.report_error()*
+vim.health.error({msg} [, {advice}]) *vim.health.error()*
Reports an error. {advice} is an optional list of suggestions to
present to the user.
@@ -100,17 +100,17 @@ All such health modules must return a Lua table containing a `check()`
function.
Copy this sample code into `lua/foo/health.lua`, replacing "foo" in the path
-with your plugin name: >
+with your plugin name: >lua
local M = {}
M.check = function()
- vim.health.report_start("my_plugin report")
+ vim.health.start("foo report")
-- make sure setup function parameters are ok
if check_setup() then
- vim.health.report_ok("Setup is correct")
+ vim.health.ok("Setup is correct")
else
- vim.health.report_error("Setup is incorrect")
+ vim.health.error("Setup is incorrect")
end
-- do some more checking
-- ...