You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
navigator.lua/lua/navigator/lazyloader.lua

31 lines
833 B
Lua

3 years ago
local log = require"navigator.util".log
local loader = nil
local packer_plugins = packer_plugins or nil -- suppress warnings
3 years ago
-- packer only
if packer_plugins ~= nil then -- packer install
local lazy_plugins = {
["nvim-lspconfig"] = "neovim/nvim-lspconfig",
["guihua.lua"] = "ray-x/guihua.lua"
}
if _NgConfigValues.lspinstall == true then
lazy_plugins["nvim-lspinstall"] = "kabouzeid/nvim-lspinstall"
3 years ago
end
-- packer installed
loader = require"packer".loader
for plugin, url in pairs(lazy_plugins) do
if not packer_plugins[url] or not packer_plugins[url].loaded then
log("loading ", plugin)
loader(plugin)
end
end
if _NgConfigValues.lspinstall == true then
local has_lspinst, lspinst = pcall(require, "lspinstall")
if has_lspinst then
lspinst.setup()
end
3 years ago
end
end