1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 23:49:19 +08:00

feat(plugins): implement lua functions

This commit is contained in:
wsdjeg 2022-09-29 10:50:36 +08:00
parent 1d43087a34
commit 4e7573096c

View File

@ -49,11 +49,19 @@ local function load_plugins()
end
local function getLayerPlugins(layer)
local ok, l = pcall(require, 'spacevim.layer.' .. layer)
if ok and l.plugins ~= nil then
return l.plugins()
end
return {}
end
local function loadLayerConfig(layer)
logger.debug('load ' .. layer .. ' layer config')
local ok, l = pcall(require, 'spacevim.layer.' .. layer)
if ok and l.config ~= nil then
l.config()
end
end
local plugins_argv = {'-update', '-openurl'}