provider: g:loaded_xx_provider=2 means "enabled and working"

Value of 1 cannot be used, because users might set that in their vimrc
to _disable_ a provider, which would confuse :checkhealth and has().
This commit is contained in:
Justin M. Keyes
2019-08-04 12:06:24 +02:00
parent 66938b928c
commit 241956720d
10 changed files with 23 additions and 21 deletions

View File

@@ -8,7 +8,7 @@ if exists('g:loaded_python_provider')
finish
endif
let [s:prog, s:err] = provider#pythonx#Detect(2)
let g:loaded_python_provider = !empty(s:prog)
let g:loaded_python_provider = empty(s:prog) ? 1 : 2
function! provider#python#Prog() abort
return s:prog