mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
@@ -370,10 +370,11 @@ function! s:check_python(version) abort
|
|||||||
let python_bin = ''
|
let python_bin = ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Check if $VIRTUAL_ENV is active
|
|
||||||
let virtualenv_inactive = 0
|
|
||||||
|
|
||||||
|
" Check if $VIRTUAL_ENV is active.
|
||||||
if exists('$VIRTUAL_ENV')
|
if exists('$VIRTUAL_ENV')
|
||||||
|
let virtualenv_inactive = 0
|
||||||
|
|
||||||
if !empty(pyenv)
|
if !empty(pyenv)
|
||||||
let pyenv_prefix = resolve(s:trim(s:system([pyenv, 'prefix'])))
|
let pyenv_prefix = resolve(s:trim(s:system([pyenv, 'prefix'])))
|
||||||
if $VIRTUAL_ENV != pyenv_prefix
|
if $VIRTUAL_ENV != pyenv_prefix
|
||||||
@@ -382,13 +383,13 @@ function! s:check_python(version) abort
|
|||||||
elseif !empty(pyname) && exepath(pyname) !~# '^'.$VIRTUAL_ENV.'/'
|
elseif !empty(pyname) && exepath(pyname) !~# '^'.$VIRTUAL_ENV.'/'
|
||||||
let virtualenv_inactive = 1
|
let virtualenv_inactive = 1
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
if virtualenv_inactive
|
if virtualenv_inactive
|
||||||
call health#report_warn(
|
call health#report_warn(
|
||||||
\ '$VIRTUAL_ENV exists but appears to be inactive. '
|
\ '$VIRTUAL_ENV exists but appears to be inactive. '
|
||||||
\ . 'This could lead to unexpected results.',
|
\ . 'This could lead to unexpected results.',
|
||||||
\ [ 'If you are using Zsh, see: http://vi.stackexchange.com/a/7654/5229' ])
|
\ [ 'If you are using Zsh, see: http://vi.stackexchange.com/a/7654' ])
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Diagnostic output
|
" Diagnostic output
|
||||||
|
@@ -114,7 +114,7 @@ let s:err = ''
|
|||||||
let s:prog = provider#node#Detect()
|
let s:prog = provider#node#Detect()
|
||||||
|
|
||||||
if empty(s:prog)
|
if empty(s:prog)
|
||||||
let s:err = 'Cannot find the "neovim" node package. Try :CheckHealth'
|
let s:err = 'Cannot find the "neovim" node package. Try :checkhealth'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call remote#host#RegisterPlugin('node-provider', 'node', [])
|
call remote#host#RegisterPlugin('node-provider', 'node', [])
|
||||||
|
@@ -1,8 +1 @@
|
|||||||
function! s:complete(lead, _line, _pos) abort
|
autocmd CmdUndefined CheckHealth checkhealth
|
||||||
return sort(filter(map(globpath(&runtimepath, 'autoload/health/*', 1, 1),
|
|
||||||
\ 'fnamemodify(v:val, ":t:r")'),
|
|
||||||
\ 'empty(a:lead) || v:val[:strlen(a:lead)-1] ==# a:lead'))
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
command! -nargs=* -complete=customlist,s:complete CheckHealth
|
|
||||||
\ call health#check([<f-args>])
|
|
||||||
|
Reference in New Issue
Block a user