diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-10-16 01:40:16 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-10-16 01:40:16 +0200 |
commit | 6cb31718df762c6ebf764986074f08b19d6f82f8 (patch) | |
tree | 4bc60c9d94de082914ea9ab2d488114caff4edd4 /init.lua | |
parent | 68c0f6bab06ea587b9b258d1ad3b0c9870bc163f (diff) |
Refactor loading of plugins with packer
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3,10 +3,12 @@ local fn = vim.fn local fmt = string.format local execute = vim.api.nvim_command local packer_path = fn.stdpath "data" .. "/site/pack/packer/start" +local sync = false local function ensure(user, repository) local path = fmt("%s/%s", packer_path, repository) if fn.empty(fn.glob(path)) > 0 then + sync = true execute( fmt("!git clone --depth 1 https://github.com/%s/%s %s", user, repository, path) ) @@ -18,6 +20,10 @@ ensure("wbthomason", "packer.nvim") ensure("Olical", "aniseed") ensure("lewis6991", "impatient.nvim") +if sync then + require("packer").sync() +end + require "impatient" vim.g["aniseed#env"] = { |