diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-04-11 21:09:41 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-04-11 21:09:41 +0200 |
commit | b669753c7c1514e80cce44d7b403d829e465a602 (patch) | |
tree | 8765ab6e639ed83b3fc6926647f64d191cee2af3 | |
parent | 815139e8a828e2bc049bf68682895291aad5aa04 (diff) |
fix(bootstrap): add bootstrap check
-rw-r--r-- | bootstrap.lua | 8 |
1 files changed, 8 insertions, 0 deletions
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 |