feat(plugin): keep track of the module a spec fragment was defined in

This commit is contained in:
Folke Lemaitre 2023-10-04 00:20:08 +02:00
parent 8b73492249
commit 8eb8de29af
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
2 changed files with 2 additions and 0 deletions

View File

@ -137,6 +137,7 @@ function Spec:add(plugin, results)
fid = M.last_fid, fid = M.last_fid,
fpid = fpid, fpid = fpid,
dep = fpid ~= nil, dep = fpid ~= nil,
module = self.importing,
} }
self.fragments[plugin._.fid] = plugin self.fragments[plugin._.fid] = plugin

View File

@ -17,6 +17,7 @@
---@field dep? boolean True if this plugin is only in the spec as a dependency ---@field dep? boolean True if this plugin is only in the spec as a dependency
---@field cond? boolean ---@field cond? boolean
---@field super? LazyPlugin ---@field super? LazyPlugin
---@field module? string
---@alias PluginOpts table|fun(self:LazyPlugin, opts:table):table? ---@alias PluginOpts table|fun(self:LazyPlugin, opts:table):table?