mirror of https://github.com/folke/lazy.nvim.git
fix(loader): load plugin opts inside a `try` clause to report errors
This commit is contained in:
parent
9375f68dcd
commit
7160ca419e
|
@ -234,10 +234,10 @@ end
|
|||
--- runs plugin config
|
||||
---@param plugin LazyPlugin
|
||||
function M.config(plugin)
|
||||
local opts = Plugin.values(plugin, "opts", false)
|
||||
local fn
|
||||
if type(plugin.config) == "function" then
|
||||
fn = function()
|
||||
local opts = Plugin.values(plugin, "opts", false)
|
||||
plugin.config(plugin, opts)
|
||||
end
|
||||
else
|
||||
|
@ -255,6 +255,7 @@ function M.config(plugin)
|
|||
end
|
||||
if #mods == 1 then
|
||||
fn = function()
|
||||
local opts = Plugin.values(plugin, "opts", false)
|
||||
require(mods[1]).setup(opts)
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue