aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-10-15 20:31:12 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-10-17 01:51:21 +0200
commitd214df4e9b23b5f2d9f7e6c78624881a7d298cdb (patch)
tree6817d299e5b25833cfb45d0383bdd03b474aec60
parent5baeb4a49c061472a125f98af798c522d8504fbe (diff)
downloadrneovim-d214df4e9b23b5f2d9f7e6c78624881a7d298cdb.tar.gz
rneovim-d214df4e9b23b5f2d9f7e6c78624881a7d298cdb.tar.bz2
rneovim-d214df4e9b23b5f2d9f7e6c78624881a7d298cdb.zip
doc: replace ":CheckHealth" with ":checkhealth"
-rw-r--r--runtime/autoload/health.vim2
-rw-r--r--runtime/autoload/provider/ruby.vim2
-rw-r--r--runtime/doc/pi_health.txt92
-rw-r--r--runtime/doc/provider.txt4
-rw-r--r--runtime/doc/vim_diff.txt2
-rw-r--r--src/nvim/ops.c2
-rw-r--r--src/nvim/version.c2
-rw-r--r--test/functional/clipboard/clipboard_provider_spec.lua6
-rw-r--r--test/functional/plugin/health_spec.lua8
-rw-r--r--test/functional/provider/ruby_spec.lua2
10 files changed, 53 insertions, 69 deletions
diff --git a/runtime/autoload/health.vim b/runtime/autoload/health.vim
index d0ad7729ab..028b6cca8e 100644
--- a/runtime/autoload/health.vim
+++ b/runtime/autoload/health.vim
@@ -18,7 +18,7 @@ function! s:enhance_syntax() abort
syntax match healthBar "|" contained conceal
highlight link healthHelp Identifier
- " We do not care about markdown syntax errors in :CheckHealth output.
+ " We do not care about markdown syntax errors in :checkhealth output.
highlight! link markdownError Normal
endfunction
diff --git a/runtime/autoload/provider/ruby.vim b/runtime/autoload/provider/ruby.vim
index 91b7fb9f2c..7df3500267 100644
--- a/runtime/autoload/provider/ruby.vim
+++ b/runtime/autoload/provider/ruby.vim
@@ -75,7 +75,7 @@ let s:prog = provider#ruby#Detect()
let s:plugin_path = expand('<sfile>:p:h') . '/script_host.rb'
if empty(s:prog)
- let s:err = 'Cannot find the neovim RubyGem. Try :CheckHealth'
+ let s:err = 'Cannot find the neovim RubyGem. Try :checkhealth'
endif
call remote#host#RegisterClone('legacy-ruby-provider', 'ruby')
diff --git a/runtime/doc/pi_health.txt b/runtime/doc/pi_health.txt
index f77267288c..3fd649f1f8 100644
--- a/runtime/doc/pi_health.txt
+++ b/runtime/doc/pi_health.txt
@@ -5,50 +5,36 @@ Author: TJ DeVries <devries.timothyj@gmail.com>
Type <M-]> to see the table of contents.
==============================================================================
-Introduction *healthcheck* *health.vim-intro*
+Introduction *health*
-Troubleshooting user configuration problems is a time-consuming task that
-developers want to minimize. health.vim provides a simple framework for plugin
-authors to hook into, and for users to invoke, to check and report the user's
-configuration and environment. Type this command to try it: >
+health.vim is a minimal framework to help with troubleshooting user
+configuration. Nvim ships with healthchecks for configuration, performance,
+python support, ruby support, clipboard support, and more.
- :CheckHealth
-<
-For example, some users have broken or unusual Python setups, which breaks the
-|:python| command. |:CheckHealth| detects several common Python configuration
-problems and reports them. If the Neovim Python module is not installed, it
-shows a warning: >
+To run the healthchecks, use this command: >
- You have not installed the Neovim Python module
- You might want to try `pip install Neovim`
-<
-Plugin authors are encouraged to add healthchecks, see |health.vim-dev|.
+ :checkhealth
+<
+Plugin authors are encouraged to write new healthchecks. |health-dev|
==============================================================================
-Commands and functions *health.vim-manual*
-
-Commands
-------------------------------------------------------------------------------
- *:CheckHealth*
-:CheckHealth Run all healthchecks and show the output in a new
- tabpage. These healthchecks are included by default:
- - python2
- - python3
- - ruby
- - remote plugin
-
-:CheckHealth {plugins}
- Run healthchecks for one or more plugins. E.g. to run
+Commands *health-commands*
+
+ *:checkhealth* *:CheckHealth*
+:checkhealth Run all healthchecks.
+
+:checkhealth {plugins}
+ Run healthcheck(s) for one or more plugins. E.g. to run
only the standard Nvim healthcheck: >
- :CheckHealth nvim
+ :checkhealth nvim
< To run the healthchecks for the "foo" and "bar" plugins
(assuming these plugins are on your 'runtimepath' and
they have implemented health#foo#check() and
health#bar#check(), respectively): >
- :CheckHealth foo bar
+ :checkhealth foo bar
<
-Functions
-------------------------------------------------------------------------------
+==============================================================================
+Functions *health-functions*
health.vim functions are for creating new healthchecks. They mostly just do
some layout and formatting, to give users a consistent presentation.
@@ -59,51 +45,49 @@ health#report_start({name}) *health#report_start*
per section.
health#report_info({msg}) *health#report_info*
- Displays an informational message.
+ Reports an informational message.
health#report_ok({msg}) *health#report_ok*
- Displays a "success" message.
+ Reports a "success" message.
health#report_warn({msg}, [{advice}]) *health#report_warn*
- Displays a warning. {advice} is an optional List of suggestions.
+ Reports a warning. {advice} is an optional List of suggestions.
health#report_error({msg}, [{advice}]) *health#report_error*
- Displays an error. {advice} is an optional List of suggestions.
+ Reports an error. {advice} is an optional List of suggestions.
health#{plugin}#check() *health.user_checker*
- This is the form of a healthcheck definition. Call the above functions
- from this function, then |:CheckHealth| does the rest. Example: >
+ Healthcheck function for {plugin}. Called by |:checkhealth|
+ automatically. Example: >
function! health#my_plug#check() abort
silent call s:check_environment_vars()
silent call s:check_python_configuration()
endfunction
<
- The function will be found and called automatically when the user
- invokes |:CheckHealth|.
-
All output will be captured from the healthcheck. Use the
health#report_* functions so that your healthcheck has a format
consistent with the standard healthchecks.
==============================================================================
-Create a healthcheck *health.vim-dev*
+Create a healthcheck *health-dev*
-Healthchecks are functions that check the health of the system. Neovim has
-built-in checkers, found in $VIMRUNTIME/autoload/health/.
+Healthchecks are functions that check the user environment, configuration,
+etc. Nvim has built-in healthchecks in $VIMRUNTIME/autoload/health/.
-To add a new checker for your own plugin, simply define a
+To add a new healthcheck for your own plugin, simply define a
health#{plugin}#check() function in autoload/health/{plugin}.vim.
-|:CheckHealth| automatically finds and invokes such functions.
+|:checkhealth| automatically finds and invokes such functions.
-If your plugin is named "jslint", then its healthcheck function must be >
- health#jslint#check()
+If your plugin is named "foo", then its healthcheck function must be >
+ health#foo#check()
defined in this file on 'runtimepath': >
- autoload/health/jslint.vim
+ autoload/health/foo.vim
-Here's a sample to get started: >
- function! health#jslint#check() abort
+Copy this sample code into autoload/health/foo.vim and replace "foo" with your
+plugin name: >
+ function! health#foo#check() abort
call health#report_start('sanity checks')
" perform arbitrary checks
" ...
@@ -111,8 +95,8 @@ Here's a sample to get started: >
if looks_good
call health#report_ok('found required dependencies')
else
- call health#report_error('cannot find jslint',
- \ ['npm install --save jslint'])
+ call health#report_error('cannot find foo',
+ \ ['npm install --save foo'])
endif
endfunction
diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt
index 50307ccbf3..60d0414edd 100644
--- a/runtime/doc/provider.txt
+++ b/runtime/doc/provider.txt
@@ -20,7 +20,7 @@ Note: Only the Vim 7.3 API is supported; bindeval (Vim 7.4) is not.
PYTHON QUICKSTART ~
If you used a package manager to install Nvim, you might already have the
-required `neovim` Python package. Run |:CheckHealth| to see if your system is
+required `neovim` Python package. Run |:checkhealth| to see if your system is
up-to-date.
Following are steps to install the package with Python's `pip` tool.
@@ -88,7 +88,7 @@ Ruby integration *provider-ruby*
Nvim supports the Vim legacy |ruby-vim| interface via external Ruby
interpreters connected via |RPC|.
-Run |:CheckHealth| to see if your system is up-to-date.
+Run |:checkhealth| to see if your system is up-to-date.
RUBY QUICKSTART ~
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 5df3852d8e..16a63a2df4 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -127,7 +127,7 @@ Variables:
|v:windowid| is always available (for use by external UIs)
Commands:
- |:CheckHealth|
+ |:checkhealth|
|:drop| is available on all platforms
|:Man| is available by default, with many improvements such as completion
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index e7bc20698b..c6df71ea46 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -5535,7 +5535,7 @@ int get_default_register_name(void)
static yankreg_T *adjust_clipboard_name(int *name, bool quiet, bool writing)
{
#define MSG_NO_CLIP "clipboard: No provider. " \
- "Try \":CheckHealth\" or \":h clipboard\"."
+ "Try \":checkhealth\" or \":h clipboard\"."
yankreg_T *target = NULL;
bool explicit_cb_reg = (*name == '*' || *name == '+');
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 7e59f3327a..c2a8dcac07 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -1365,7 +1365,7 @@ void intro_message(int colon)
N_("https://neovim.io/community"),
"",
N_("type :help nvim<Enter> if you are new! "),
- N_("type :CheckHealth<Enter> to optimize Nvim"),
+ N_("type :checkhealth<Enter> to optimize Nvim"),
N_("type :q<Enter> to exit "),
N_("type :help<Enter> for help "),
"",
diff --git a/test/functional/clipboard/clipboard_provider_spec.lua b/test/functional/clipboard/clipboard_provider_spec.lua
index b90335e70a..a3ea3b568f 100644
--- a/test/functional/clipboard/clipboard_provider_spec.lua
+++ b/test/functional/clipboard/clipboard_provider_spec.lua
@@ -100,7 +100,7 @@ describe('clipboard', function()
^ |
~ |
~ |
- clipboard: No provider. Try ":CheckHealth" or ":h clipboard". |
+ clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
]], nil, {{bold = true, foreground = Screen.colors.Blue}})
end)
@@ -112,7 +112,7 @@ describe('clipboard', function()
feed_command('redir @+> | bogus_cmd | redir END')
screen:expect([[
~ |
- clipboard: No provider. Try ":CheckHealth" or ":h clipboard". |
+ clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
E492: Not an editor command: bogus_cmd | redir END |
Press ENTER or type command to continue^ |
]], nil, {{bold = true, foreground = Screen.colors.Blue}})
@@ -132,7 +132,7 @@ describe('clipboard', function()
^ |
~ |
~ |
- clipboard: No provider. Try ":CheckHealth" or ":h clipboard". |
+ clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
]], nil, {{bold = true, foreground = Screen.colors.Blue}})
end)
diff --git a/test/functional/plugin/health_spec.lua b/test/functional/plugin/health_spec.lua
index a85a3ce495..a91c0b401b 100644
--- a/test/functional/plugin/health_spec.lua
+++ b/test/functional/plugin/health_spec.lua
@@ -68,7 +68,7 @@ describe('health.vim', function()
describe(":checkhealth", function()
it("concatenates multiple reports", function()
- command("CheckHealth success1 success2")
+ command("checkhealth success1 success2")
helpers.expect([[
health#success1#check
@@ -87,7 +87,7 @@ describe('health.vim', function()
end)
it("gracefully handles broken healthcheck", function()
- command("CheckHealth broken")
+ command("checkhealth broken")
helpers.expect([[
health#broken#check
@@ -111,7 +111,7 @@ describe('health.vim', function()
Bar = { foreground=Screen.colors.Purple },
Bullet = { bold=true, foreground=Screen.colors.Brown },
})
- command("CheckHealth foo success1")
+ command("checkhealth foo success1")
command("1tabclose")
command("set laststatus=0")
screen:expect([[
@@ -129,7 +129,7 @@ describe('health.vim', function()
end)
it("gracefully handles invalid healthcheck", function()
- command("CheckHealth non_existent_healthcheck")
+ command("checkhealth non_existent_healthcheck")
helpers.expect([[
health#non_existent_healthcheck#check
diff --git a/test/functional/provider/ruby_spec.lua b/test/functional/provider/ruby_spec.lua
index 9f5ef3b3fc..c70f90da1c 100644
--- a/test/functional/provider/ruby_spec.lua
+++ b/test/functional/provider/ruby_spec.lua
@@ -16,7 +16,7 @@ do
clear()
if missing_provider('ruby') then
pending(
- "Cannot find the neovim RubyGem. Try :CheckHealth",
+ "Cannot find the neovim RubyGem. Try :checkhealth",
function() end)
return
end