fix: plugin list can be string[]. Fixes #145

This commit is contained in:
Folke Lemaitre 2022-12-24 11:15:57 +01:00
parent 86f2c67aa8
commit 74d8b8e4e1
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 5 additions and 1 deletions

View File

@ -9,7 +9,7 @@ local M = {}
---@field clear? boolean
---@field show? boolean
---@field mode? string
---@field plugins? LazyPlugin[]
---@field plugins? (LazyPlugin|string)[]
---@field concurrency? number
---@param ropts RunnerOpts
@ -18,6 +18,10 @@ function M.run(ropts, opts)
opts = opts or {}
if opts.plugins then
---@param plugin string|LazyPlugin
opts.plugins = vim.tbl_map(function(plugin)
return type(plugin) == "string" and Config.plugins[plugin] or plugin
end, vim.tbl_values(opts.plugins))
ropts.plugins = opts.plugins
end