diff options
author | Sathya Pramodh <94102031+sathya-pramodh@users.noreply.github.com> | 2025-03-29 23:36:23 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-29 11:06:23 -0700 |
commit | b4906577c9f1f0a8bcfa096288d1a56630b142f3 (patch) | |
tree | a2481918cf317e61a51fadf1fe5af248bc38d2e8 /runtime/lua/vim | |
parent | f4fc769c81af6f8d9235d59aec75cfe7c104b3ce (diff) | |
download | rneovim-b4906577c9f1f0a8bcfa096288d1a56630b142f3.tar.gz rneovim-b4906577c9f1f0a8bcfa096288d1a56630b142f3.tar.bz2 rneovim-b4906577c9f1f0a8bcfa096288d1a56630b142f3.zip |
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.
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r-- | runtime/lua/vim/health/health.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/lua/vim/health/health.lua b/runtime/lua/vim/health/health.lua index dd6fe7f608..38fcd64f88 100644 --- a/runtime/lua/vim/health/health.lua +++ b/runtime/lua/vim/health/health.lua @@ -110,6 +110,16 @@ local function check_config() ) end + if vim.g.loaded_python3_provider == 1 then + ok = false + health.error( + '`g:loaded_python3_provider=1` may have been set by mistake. This option should not be used to load python provider in your config.', + { + 'Remove `vim.g.loaded_python3_provider=1` from your config.', + } + ) + end + local writeable = true local shadaopt = vim.fn.split(vim.o.shada, ',') local shadafile = ( |