packerInit: Clone packer at opt path as we are lazy loading

move packadd to packerInit
This commit is contained in:
Akianonymus 2021-07-19 06:19:27 +05:30
parent d257c4dd85
commit 05d57bba29
2 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,9 @@
vim.cmd("packadd packer.nvim")
local present, packer = pcall(require, "packer")
if not present then
local packer_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
local packer_path = vim.fn.stdpath("data") .. "/site/pack/packer/opt/packer.nvim"
print("Cloning packer..")
-- remove the dir before cloning
@ -17,6 +19,7 @@ if not present then
}
)
vim.cmd("packadd packer.nvim")
present, packer = pcall(require, "packer")
if present then

View File

@ -1,5 +1,3 @@
vim.cmd [[packadd packer.nvim]]
local present, _ = pcall(require, "packerInit")
if present then