From dab6cd50806d6a6b0e8267f628d5fd6b112b151c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 13 May 2023 16:09:48 +0200 Subject: [PATCH] feat(loader): added explicit support for finding the main module for mini.nvim plugins --- lua/lazy/core/loader.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index 03f1105..a6eeb55 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -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