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:
parent
1d43087a34
commit
4e7573096c
@ -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'}
|
||||
|
Loading…
x
Reference in New Issue
Block a user