Don't load packer at startup

This commit is contained in:
nullchilly 2022-08-06 10:58:05 +07:00 committed by Sidhanth Rathod
parent 22c3cc0c0d
commit b3d3c5a7dd
3 changed files with 14 additions and 19 deletions

View file

@ -4,6 +4,18 @@ require "core.options"
require("core.utils").load_mappings()
-- setup packer + plugins
require("core.packer").bootstrap()
local fn = vim.fn
local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" })
print "Cloning packer .."
fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }
-- install plugins + compile their configs
vim.cmd "packadd packer.nvim"
require "plugins"
vim.cmd "PackerSync"
end
pcall(require, "custom")