This repository has been archived on 2026-01-13. You can view files and clone it, but cannot push or open issues or pull requests.
nvim/lua/core/packer.lua

42 lines
787 B
Lua

local M = {}
M.run = function(plugins)
local present, packer = pcall(require, "packer")
if not present then
return
end
local final_table = {}
for key, _ in pairs(plugins) do
plugins[key][1] = key
final_table[#final_table + 1] = plugins[key]
end
packer.init({
auto_clean = true,
compile_on_sync = true,
git = { clone_timeout = 6000 },
display = {
working_sym = "",
error_sym = "",
done_sym = "",
removed_sym = "",
moved_sym = "",
open_fn = function()
return require("packer.util").float { border = "single" }
end,
}
})
packer.startup(function(use)
for _, v in pairs(final_table) do
use(v)
end
end)
end
return M