mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 09:30:04 +08:00
21 lines
400 B
Lua
Vendored
21 lines
400 B
Lua
Vendored
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
|