fix(checkhealth): failed if 'lua' in plugin name

This commit is contained in:
phanium 2025-01-23 10:39:26 +08:00 committed by Lewis Russell
parent a9c12d4c29
commit 4c9f3689a1

View File

@ -118,7 +118,7 @@ local function filepath_to_healthcheck(path)
func = 'health#' .. name .. '#check'
filetype = 'v'
else
local subpath = path:gsub('.*lua/', '')
local subpath = path:gsub('.*/lua/', '')
if vim.fs.basename(subpath) == 'health.lua' then
-- */health.lua
name = vim.fs.dirname(subpath)