From 05d57bba29a19888d1d0be39e475d25409f0425d Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 19 Jul 2021 06:19:27 +0530 Subject: [PATCH] packerInit: Clone packer at opt path as we are lazy loading move packadd to packerInit --- lua/packerInit.lua | 5 ++++- lua/pluginList.lua | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/packerInit.lua b/lua/packerInit.lua index c23706a0..aa9101ad 100644 --- a/lua/packerInit.lua +++ b/lua/packerInit.lua @@ -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 diff --git a/lua/pluginList.lua b/lua/pluginList.lua index d95c7ccc..bd242cb2 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -1,5 +1,3 @@ -vim.cmd [[packadd packer.nvim]] - local present, _ = pcall(require, "packerInit") if present then