diff options
author | dundargoc <gocdundar@gmail.com> | 2024-05-22 16:07:45 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-05-22 20:15:17 +0200 |
commit | e8f7025de1d8b7c8bbe747736e4c46dcd6e73133 (patch) | |
tree | 6dba4440bc8bef6a9a205b08e5ebb18e518a420f /runtime/lua/vim/provider | |
parent | 339129ebc9503883a3f060d3eff620d67a9eadaf (diff) | |
download | rneovim-e8f7025de1d8b7c8bbe747736e4c46dcd6e73133.tar.gz rneovim-e8f7025de1d8b7c8bbe747736e4c46dcd6e73133.tar.bz2 rneovim-e8f7025de1d8b7c8bbe747736e4c46dcd6e73133.zip |
docs: move vim.health documentation to lua.txt
`vim.health` is not a "plugin" but part of our Lua API and the
documentation should reflect that. This also helps make the
documentation maintenance easier as it is now generated.
Diffstat (limited to 'runtime/lua/vim/provider')
-rw-r--r-- | runtime/lua/vim/provider/clipboard/health.lua | 2 | ||||
-rw-r--r-- | runtime/lua/vim/provider/node/health.lua | 8 | ||||
-rw-r--r-- | runtime/lua/vim/provider/perl/health.lua | 8 | ||||
-rw-r--r-- | runtime/lua/vim/provider/python/health.lua | 16 | ||||
-rw-r--r-- | runtime/lua/vim/provider/ruby/health.lua | 8 |
5 files changed, 21 insertions, 21 deletions
diff --git a/runtime/lua/vim/provider/clipboard/health.lua b/runtime/lua/vim/provider/clipboard/health.lua index e44f7d32cc..0af6a44330 100644 --- a/runtime/lua/vim/provider/clipboard/health.lua +++ b/runtime/lua/vim/provider/clipboard/health.lua @@ -9,7 +9,7 @@ function M.check() os.getenv('TMUX') and vim.fn.executable('tmux') == 1 and vim.fn.executable('pbpaste') == 1 - and not health.cmd_ok('pbpaste') + and not health._cmd_ok('pbpaste') then local tmux_version = string.match(vim.fn.system('tmux -V'), '%d+%.%d+') local advice = { diff --git a/runtime/lua/vim/provider/node/health.lua b/runtime/lua/vim/provider/node/health.lua index 471c625388..b24a9e0061 100644 --- a/runtime/lua/vim/provider/node/health.lua +++ b/runtime/lua/vim/provider/node/health.lua @@ -6,7 +6,7 @@ local M = {} function M.check() health.start('Node.js provider (optional)') - if health.provider_disabled('node') then + if health._provider_disabled('node') then return end @@ -26,7 +26,7 @@ function M.check() end -- local node_v = vim.fn.split(system({'node', '-v'}), "\n")[1] or '' - local ok, node_v = health.cmd_ok({ 'node', '-v' }) + local ok, node_v = health._cmd_ok({ 'node', '-v' }) health.info('Node.js: ' .. node_v) if not ok or vim.version.lt(node_v, '6.0.0') then health.warn('Nvim node.js host does not support Node ' .. node_v) @@ -63,7 +63,7 @@ function M.check() iswin and 'cmd /c ' .. manager .. ' info neovim --json' or manager .. ' info neovim --json' ) local latest_npm - ok, latest_npm = health.cmd_ok(vim.split(latest_npm_cmd, ' ')) + ok, latest_npm = health._cmd_ok(vim.split(latest_npm_cmd, ' ')) if not ok or latest_npm:find('^%s$') then health.error( 'Failed to run: ' .. latest_npm_cmd, @@ -81,7 +81,7 @@ function M.check() local current_npm_cmd = { 'node', host, '--version' } local current_npm - ok, current_npm = health.cmd_ok(current_npm_cmd) + ok, current_npm = health._cmd_ok(current_npm_cmd) if not ok then health.error( 'Failed to run: ' .. table.concat(current_npm_cmd, ' '), diff --git a/runtime/lua/vim/provider/perl/health.lua b/runtime/lua/vim/provider/perl/health.lua index 535093d793..ffc0419b94 100644 --- a/runtime/lua/vim/provider/perl/health.lua +++ b/runtime/lua/vim/provider/perl/health.lua @@ -5,7 +5,7 @@ local M = {} function M.check() health.start('Perl provider (optional)') - if health.provider_disabled('perl') then + if health._provider_disabled('perl') then return end @@ -24,7 +24,7 @@ function M.check() -- we cannot use cpanm that is on the path, as it may not be for the perl -- set with g:perl_host_prog - local ok = health.cmd_ok({ perl_exec, '-W', '-MApp::cpanminus', '-e', '' }) + local ok = health._cmd_ok({ perl_exec, '-W', '-MApp::cpanminus', '-e', '' }) if not ok then return { perl_exec, '"App::cpanminus" module is not installed' } end @@ -36,7 +36,7 @@ function M.check() 'my $app = App::cpanminus::script->new; $app->parse_options ("--info", "-q", "Neovim::Ext"); exit $app->doit', } local latest_cpan - ok, latest_cpan = health.cmd_ok(latest_cpan_cmd) + ok, latest_cpan = health._cmd_ok(latest_cpan_cmd) if not ok or latest_cpan:find('^%s*$') then health.error( 'Failed to run: ' .. table.concat(latest_cpan_cmd, ' '), @@ -67,7 +67,7 @@ function M.check() local current_cpan_cmd = { perl_exec, '-W', '-MNeovim::Ext', '-e', 'print $Neovim::Ext::VERSION' } local current_cpan - ok, current_cpan = health.cmd_ok(current_cpan_cmd) + ok, current_cpan = health._cmd_ok(current_cpan_cmd) if not ok then health.error( 'Failed to run: ' .. table.concat(current_cpan_cmd, ' '), diff --git a/runtime/lua/vim/provider/python/health.lua b/runtime/lua/vim/provider/python/health.lua index a5bd738063..37ccb42da3 100644 --- a/runtime/lua/vim/provider/python/health.lua +++ b/runtime/lua/vim/provider/python/health.lua @@ -70,7 +70,7 @@ end local function download(url) local has_curl = vim.fn.executable('curl') == 1 if has_curl and vim.fn.system({ 'curl', '-V' }):find('Protocols:.*https') then - local out, rc = health.system({ 'curl', '-sL', url }, { stderr = true, ignore_error = true }) + local out, rc = health._system({ 'curl', '-sL', url }, { stderr = true, ignore_error = true }) if rc ~= 0 then return 'curl error with ' .. url .. ': ' .. rc else @@ -83,7 +83,7 @@ local function download(url) from urllib2 import urlopen\n\ response = urlopen('" .. url .. "')\n\ print(response.read().decode('utf8'))\n" - local out, rc = health.system({ 'python', '-c', script }) + local out, rc = health._system({ 'python', '-c', script }) if out == '' and rc ~= 0 then return 'python urllib.request error: ' .. rc else @@ -140,7 +140,7 @@ end local function version_info(python) local pypi_version = latest_pypi_version() - local python_version, rc = health.system({ + local python_version, rc = health._system({ python, '-c', 'import sys; print(".".join(str(x) for x in sys.version_info[:3]))', @@ -151,7 +151,7 @@ local function version_info(python) end local nvim_path - nvim_path, rc = health.system({ + nvim_path, rc = health._system({ python, '-c', 'import sys; sys.path = [p for p in sys.path if p != ""]; import neovim; print(neovim.__file__)', @@ -176,7 +176,7 @@ local function version_info(python) -- Try to get neovim.VERSION (added in 0.1.11dev). local nvim_version - nvim_version, rc = health.system({ + nvim_version, rc = health._system({ python, '-c', 'from neovim import VERSION as v; print("{}.{}.{}{}".format(v.major, v.minor, v.patch, v.prerelease))', @@ -223,7 +223,7 @@ function M.check() local host_prog_var = pyname .. '_host_prog' local python_multiple = {} - if health.provider_disabled(pyname) then + if health._provider_disabled(pyname) then return end @@ -265,7 +265,7 @@ function M.check() end if pyenv ~= '' then - python_exe = health.system({ pyenv, 'which', pyname }, { stderr = true }) + python_exe = health._system({ pyenv, 'which', pyname }, { stderr = true }) if python_exe == '' then health.warn('pyenv could not find ' .. pyname .. '.') end @@ -488,7 +488,7 @@ function M.check() health.info(msg) health.info( 'Python version: ' - .. health.system( + .. health._system( 'python -c "import platform, sys; sys.stdout.write(platform.python_version())"' ) ) diff --git a/runtime/lua/vim/provider/ruby/health.lua b/runtime/lua/vim/provider/ruby/health.lua index 31c2fe3201..80932e1bb0 100644 --- a/runtime/lua/vim/provider/ruby/health.lua +++ b/runtime/lua/vim/provider/ruby/health.lua @@ -6,7 +6,7 @@ local M = {} function M.check() health.start('Ruby provider (optional)') - if health.provider_disabled('ruby') then + if health._provider_disabled('ruby') then return end @@ -17,7 +17,7 @@ function M.check() ) return end - health.info('Ruby: ' .. health.system({ 'ruby', '-v' })) + health.info('Ruby: ' .. health._system({ 'ruby', '-v' })) local host, _ = vim.provider.ruby.detect() if (not host) or host:find('^%s*$') then @@ -33,7 +33,7 @@ function M.check() health.info('Host: ' .. host) local latest_gem_cmd = (iswin and 'cmd /c gem list -ra "^^neovim$"' or 'gem list -ra ^neovim$') - local ok, latest_gem = health.cmd_ok(vim.split(latest_gem_cmd, ' ')) + local ok, latest_gem = health._cmd_ok(vim.split(latest_gem_cmd, ' ')) if not ok or latest_gem:find('^%s*$') then health.error( 'Failed to run: ' .. latest_gem_cmd, @@ -46,7 +46,7 @@ function M.check() local current_gem_cmd = { host, '--version' } local current_gem - ok, current_gem = health.cmd_ok(current_gem_cmd) + ok, current_gem = health._cmd_ok(current_gem_cmd) if not ok then health.error( 'Failed to run: ' .. table.concat(current_gem_cmd, ' '), |