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

26 lines
617 B
Lua
Raw Normal View History

2022-01-04 23:15:17 +08:00
--=============================================================================
-- api.lua --- lua api plugin
2023-03-26 13:50:22 +08:00
-- Copyright (c) 2016-2023 Wang Shidong & Contributors
2022-01-04 23:15:17 +08:00
-- Author: Wang Shidong < wsdjeg@outlook.com >
-- URL: https://spacevim.org
-- License: GPLv3
--=============================================================================
local M = {}
2022-09-25 19:12:46 +08:00
-- local logger = require('spacevim.logger')
2022-01-04 23:15:17 +08:00
function M.import(name)
local p = 'spacevim.api.' .. name
local ok, rst = pcall(require, p)
2022-09-25 19:12:46 +08:00
if ok then
package.loaded[p] = nil
2022-09-25 19:12:46 +08:00
return rst
else
return nil
2022-09-25 19:12:46 +08:00
end
2019-05-31 21:45:09 +08:00
end
2022-01-04 23:15:17 +08:00
return M