feat(spec): event, keys, ft and cmd can now also be a function that returns the values to be used

This commit is contained in:
Folke Lemaitre 2023-01-12 13:07:51 +01:00
parent bcd87a0215
commit 2128ca90fb
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
6 changed files with 76 additions and 75 deletions

View file

@ -346,7 +346,7 @@ function M.find(modname, opts)
local updated = false
---@type LazyCoreConfig
local Config = package.loaded["lazy.core.config"]
if Config then
if Config and Config.spec then
for _, plugin in pairs(Config.spec.plugins) do
if not (M.indexed[plugin.dir] or plugin._.loaded or plugin.module == false) then
updated = M._index(plugin.dir) or updated