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
|
if plugin.main then
|
||||||
return plugin.main
|
return plugin.main
|
||||||
end
|
end
|
||||||
|
if plugin.name ~= "mini.nvim" and plugin.name:match("^mini%..*$") then
|
||||||
|
return plugin.name
|
||||||
|
end
|
||||||
local normname = Util.normname(plugin.name)
|
local normname = Util.normname(plugin.name)
|
||||||
---@type string[]
|
---@type string[]
|
||||||
local mods = {}
|
local mods = {}
|
||||||
|
@ -356,6 +359,7 @@ function M.get_main(plugin)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return #mods == 1 and mods[1] or nil
|
return #mods == 1 and mods[1] or nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue