fix(zip): do not warn when zip.lua is disabled

This commit is contained in:
Barrett Ruth
2026-08-03 11:53:12 -05:00
parent d03b4cfb7a
commit 1e757a2feb
2 changed files with 3 additions and 5 deletions

View File

@@ -31,16 +31,14 @@ local function check_active()
if legacy then
health.info('`old-zip` is loaded, so it handles archives instead of zip.lua')
health.info('zip.lua yields to it and removes its own autocommands')
health.info('zip.lua defers to it while it is loaded')
-- `old-zip` shells out to the same backend.
return true
end
if not builtin then
if vim.g.loaded_nvim_zip_plugin ~= nil then
health.warn('zip.lua is disabled by `g:loaded_nvim_zip_plugin`', {
'Unset it before startup to enable the builtin zip plugin.',
})
health.info('Disabled (`g:loaded_nvim_zip_plugin` is set).')
else
health.warn('No zip plugin is active')
end

View File

@@ -44,7 +44,7 @@ describe(':checkhealth', function()
it('getcompletion()', function()
clear { args = { '-u', 'NORC', '+set runtimepath+=test/functional/fixtures' } }
eq('vim.deprecated', getcompletion('vim', 'checkhealth')[1])
eq('nvim.zip', getcompletion('vim', 'checkhealth')[1])
eq('vim.provider', getcompletion('vim.prov', 'checkhealth')[1])
eq('vim.lsp', getcompletion('vim.ls', 'checkhealth')[1])