From 6dc7c2ef2a53a0fee742de19bfdd1e4a75a1a7c2 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 11 Apr 2022 21:22:26 +0200 Subject: fix(bootstrap): test setting env var --- bootstrap.lua | 3 +++ fnl/install.fnl | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstrap.lua b/bootstrap.lua index 6147c84..d2f4161 100644 --- a/bootstrap.lua +++ b/bootstrap.lua @@ -17,6 +17,9 @@ local function ensure(user, repository) ) ) execute(fmt("packadd %s", repository)) + if repository == "packer.nvim" then + vim.env.BOOTSTRAPPED = true + end end end diff --git a/fnl/install.fnl b/fnl/install.fnl index f6d741f..faa91e6 100644 --- a/fnl/install.fnl +++ b/fnl/install.fnl @@ -7,6 +7,8 @@ (defn- install-plugins [plgs] (packer.startup (fn [use] (each [plugin opts (pairs plgs)] - (use (a.assoc opts 1 plugin)))))) + (use (a.assoc opts 1 plugin))))) + (if vim.env.BOOTSTRAPPED + (packer.sync))) (install-plugins plugins.plugins) -- cgit v1.2.3-70-g09d2