mirror of https://github.com/folke/lazy.nvim.git
feat(loader): added explicit support for finding the main module for mini.nvim plugins
This commit is contained in:
parent
e9b3b83914
commit
dab6cd5080
|
@ -343,6 +343,9 @@ function M.get_main(plugin)
|
|||
if plugin.main then
|
||||
return plugin.main
|
||||
end
|
||||
if plugin.name ~= "mini.nvim" and plugin.name:match("^mini%..*$") then
|
||||
return plugin.name
|
||||
end
|
||||
local normname = Util.normname(plugin.name)
|
||||
---@type string[]
|
||||
local mods = {}
|
||||
|
@ -356,6 +359,7 @@ function M.get_main(plugin)
|
|||
break
|
||||
end
|
||||
end
|
||||
|
||||
return #mods == 1 and mods[1] or nil
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue