2022-01-04 23:15:17 +08:00
|
|
|
--=============================================================================
|
|
|
|
-- 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 = {}
|
|
|
|
|
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)
|
2022-09-25 19:12:46 +08:00
|
|
|
local ok, rst = pcall(require, 'spacevim.api.' .. name)
|
|
|
|
if ok then
|
|
|
|
return rst
|
|
|
|
end
|
2019-05-31 21:45:09 +08:00
|
|
|
end
|
|
|
|
|
2022-01-04 23:15:17 +08:00
|
|
|
return M
|