1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 02:50:03 +08:00
SpaceVim/lua/spacevim/api.lua
2023-03-26 13:50:22 +08:00

26 lines
617 B
Lua

--=============================================================================
-- api.lua --- lua api plugin
-- Copyright (c) 2016-2023 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