Skip to content

Commit

Permalink
fix: plugin list can be string[]. Fixes #145
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 24, 2022
1 parent 86f2c67 commit 74d8b8e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/lazy/manage/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 74d8b8e

Please sign in to comment.