mirror of
https://github.com/ray-x/navigator.lua
synced 2024-11-11 07:10:59 +00:00
30 lines
808 B
Lua
30 lines
808 B
Lua
local log = require"navigator.util".log
|
|
_LoadedClients = {}
|
|
local loader = nil
|
|
packer_plugins = packer_plugins or nil -- suppress warnings
|
|
|
|
-- 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["lspinstall"] = "kabouzeid/nvim-lspinstall"
|
|
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")
|
|
lspinst.setup()
|
|
end
|
|
end
|