1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 03:00:06 +08:00
SpaceVim/lua/spacevim/api.lua

26 lines
617 B
Lua

--=============================================================================
-- api.lua --- lua api plugin
-- Copyright (c) 2016-2019 Wang Shidong & Contributors
-- Author: Wang Shidong < wsdjeg@outlook.com >
-- URL: https://spacevim.org
-- License: GPLv3
--=============================================================================
local M = {}
-- local logger = require('spacevim.logger')
function M.import(name)
local p = 'spacevim.api.' .. name
local ok, rst = pcall(require, p)
if ok then
package.loaded[p] = nil
return rst
else
return nil
end
end
return M