aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-10-17 22:43:46 +0200
committerGitHub <noreply@github.com>2017-10-17 22:43:46 +0200
commit0cba3da26e4612c0c8fd17dd0638d76e2dc5fae0 (patch)
tree7ffd57e014e837bd31d51e81754d92094e86de22 /runtime/autoload
parent9467c8e16ee1fc04a9586e175fde371475c87e16 (diff)
parent3bcee71cc8ef782fc89de7d72cb784cfb6d984d3 (diff)
downloadrneovim-0cba3da26e4612c0c8fd17dd0638d76e2dc5fae0.tar.gz
rneovim-0cba3da26e4612c0c8fd17dd0638d76e2dc5fae0.tar.bz2
rneovim-0cba3da26e4612c0c8fd17dd0638d76e2dc5fae0.zip
Merge #7399 ':checkhealth (built-in)'
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/health.vim7
-rw-r--r--runtime/autoload/health/nvim.vim7
-rw-r--r--runtime/autoload/provider/ruby.vim2
3 files changed, 13 insertions, 3 deletions
diff --git a/runtime/autoload/health.vim b/runtime/autoload/health.vim
index d0ad7729ab..b076f2456b 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
@@ -159,7 +159,10 @@ endfunction
" Translates a list of plugin names to healthcheck function names.
function! s:to_fn_names(plugin_names) abort
let healthchecks = []
- for p in a:plugin_names
+ let plugin_names = type('') ==# type(a:plugin_names)
+ \ ? split(a:plugin_names, '', v:false)
+ \ : a:plugin_names
+ for p in plugin_names
call add(healthchecks, 'health#'.p.'#check')
endfor
return healthchecks
diff --git a/runtime/autoload/health/nvim.vim b/runtime/autoload/health/nvim.vim
index 6c6a5e8543..7f6e943dc9 100644
--- a/runtime/autoload/health/nvim.vim
+++ b/runtime/autoload/health/nvim.vim
@@ -4,12 +4,19 @@ function! s:check_config() abort
let ok = v:true
call health#report_start('Configuration')
+ " If $VIM is empty we don't care. Else make sure it is valid.
+ if !empty($VIM) && !filereadable($VIM.'/runtime/doc/nvim.txt')
+ let ok = v:false
+ call health#report_error("$VIM is invalid: ".$VIM)
+ endif
+
if exists('$NVIM_TUI_ENABLE_CURSOR_SHAPE')
let ok = v:false
call health#report_warn("$NVIM_TUI_ENABLE_CURSOR_SHAPE is ignored in Nvim 0.2+",
\ [ "Use the 'guicursor' option to configure cursor shape. :help 'guicursor'",
\ 'https://github.com/neovim/neovim/wiki/Following-HEAD#20170402' ])
endif
+
if &paste
let ok = v:false
call health#report_error("'paste' is enabled. This option is only for pasting text.\nIt should not be set in your config.",
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')