From b669753c7c1514e80cce44d7b403d829e465a602 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 11 Apr 2022 21:09:41 +0200 Subject: fix(bootstrap): add bootstrap check --- bootstrap.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bootstrap.lua') diff --git a/bootstrap.lua b/bootstrap.lua index 6147c84..a0b557d 100644 --- a/bootstrap.lua +++ b/bootstrap.lua @@ -3,6 +3,7 @@ local fn = vim.fn local fmt = string.format local execute = vim.api.nvim_command +local is_bootstrapped = false local function ensure(user, repository) local packer_path = fn.stdpath "data" .. "/site/pack" @@ -17,6 +18,9 @@ local function ensure(user, repository) ) ) execute(fmt("packadd %s", repository)) + if repository == "packer.nvim" then + is_bootstrapped = true + end end end @@ -24,3 +28,7 @@ end ensure("wbthomason", "packer.nvim") ensure("Olical", "aniseed") ensure("lewis6991", "impatient.nvim") + +if is_bootstrapped then + require("packer").sync() +end -- cgit v1.2.3-70-g09d2