From 830b5819a046b03750a74fa6d745d1200c6215ec Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 22 Feb 2018 02:38:00 +0100 Subject: [PATCH] health/provider: check Python also with loaded_var (#8047) `g:loaded_python3_provider` gets set when the autoload file is sourced, but this might error out, e.g. with deoplete: [deoplete] Failed to load python3 host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages. [deoplete] function remote#define#FunctionBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require[13]..provider#Poll, line 14 [deoplete] deoplete requires Python3 support("+python3"). [deoplete] deoplete failed to load. Try the :UpdateRemotePlugins command and restart Neovim. See also :checkhealth. It refers to `:checkhealth` from there explicitly, which would then (without this patch) say that Python 3 is disabled. This patch changes the reported info to include that it might have been disabled due to some error, and keeps on going. --- runtime/autoload/health/provider.vim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index b124d04ea8..e18125300c 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -260,8 +260,7 @@ function! s:check_python(version) abort let python_multiple = [] if exists(loaded_var) && !exists('*provider#'.pyname.'#Call') - call health#report_info('Disabled. '.loaded_var.'='.eval(loaded_var)) - return + call health#report_info('Disabled ('.loaded_var.'='.eval(loaded_var).'). This might be due to some previous error.') endif if !empty(pyenv)