fix(provider): misleading :checkhealth if user sets g:loaded_python3_provider=1 #32696

Problem:
:checkhealth shows a confusing message if user sets
g:loaded_python3_provider=1.

Solution:
- Show a warning if that var is set to 1.
- Update provider modules to default to 0. Any user code that is
  checking for 1, is like already broken because these may be set to 2.
This commit is contained in:
Sathya Pramodh
2025-03-29 23:36:23 +05:30
committed by GitHub
parent f4fc769c81
commit b4906577c9
6 changed files with 18 additions and 8 deletions

View File

@@ -11,5 +11,5 @@ function! provider#python3#Require(host) abort
endfunction
let s:prog = v:lua.vim.provider.python.detect_by_module('neovim')
let g:loaded_python3_provider = empty(s:prog) ? 1 : 2
let g:loaded_python3_provider = empty(s:prog) ? 0 : 2
call v:lua.require'vim.provider.python'.start()