mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-12 02:23:39 +08:00
21 lines
400 B
Lua
21 lines
400 B
Lua
|
PLENARY_DEBUG = PLENARY_DEBUG == nil and true or PLENARY_DEBUG
|
||
|
|
||
|
if PLENARY_DEBUG then
|
||
|
require("plenary.reload").reload_module "plenary"
|
||
|
end
|
||
|
|
||
|
-- Lazy load everything into plenary.
|
||
|
local plenary = setmetatable({}, {
|
||
|
__index = function(t, k)
|
||
|
local ok, val = pcall(require, string.format("plenary.%s", k))
|
||
|
|
||
|
if ok then
|
||
|
rawset(t, k, val)
|
||
|
end
|
||
|
|
||
|
return val
|
||
|
end,
|
||
|
})
|
||
|
|
||
|
return plenary
|