Update utils.lua
This commit is contained in:
parent
9472212cee
commit
c74b049408
@ -84,18 +84,13 @@ M.plugin_list = function(default_plugins)
|
|||||||
|
|
||||||
-- require if string is present
|
-- require if string is present
|
||||||
local ok
|
local ok
|
||||||
|
|
||||||
if type(user_plugins) == "string" then
|
if type(user_plugins) == "string" then
|
||||||
ok, user_plugins = pcall(require, user_plugins)
|
ok, user_plugins = pcall(require, user_plugins)
|
||||||
if ok and not type(user_plugins) == "table" then
|
if ok and not type(user_plugins) == "table" then
|
||||||
user_plugins = {}
|
user_plugins = {}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if type(plug_override) == "string" then
|
|
||||||
ok, plug_override = pcall(require, plug_override)
|
|
||||||
if ok and not type(plug_override) == "table" then
|
|
||||||
plug_override = {}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- merge default + user plugin table
|
-- merge default + user plugin table
|
||||||
default_plugins = vim.tbl_deep_extend("force", default_plugins, user_plugins)
|
default_plugins = vim.tbl_deep_extend("force", default_plugins, user_plugins)
|
||||||
|
Loading…
Reference in New Issue
Block a user