From 5e638eed2989832b50434ee1364fc8094a085537 Mon Sep 17 00:00:00 2001 From: Pierre Jeanjean Date: Mon, 29 Aug 2022 13:50:51 +0200 Subject: [PATCH] [NeoVim] Call PackerSync after Fennel changes --- .config/nvim/plugin/bootstrap.lua | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.config/nvim/plugin/bootstrap.lua b/.config/nvim/plugin/bootstrap.lua index 2af9c8d..17699d7 100644 --- a/.config/nvim/plugin/bootstrap.lua +++ b/.config/nvim/plugin/bootstrap.lua @@ -3,17 +3,27 @@ local install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/' local function bootstrap(url) local name = url:gsub('.*/', '') local path = install_path .. name + local bootstrapped = false if vim.fn.empty(vim.fn.glob(path)) > 0 then vim.fn.system({'git', 'clone', '--depth', '1', url, path}) vim.cmd('packadd ' .. name) + bootstrapped = true end + return bootstrapped end -bootstrap('https://github.com/udayvir-singh/tangerine.nvim') +local tangerine_bootstrapped = bootstrap('https://github.com/udayvir-singh/tangerine.nvim') bootstrap('https://github.com/udayvir-singh/hibiscus.nvim') -require('tangerine').setup({ - compiler = { - hooks = {'oninit'} - } -}) +if tangerine_bootstrapped then + require('tangerine').setup({ + compiler = { + hooks = {'oninit'} + } + }) +else + require('tangerine').setup({}) + if (#(require('tangerine.vim.hooks').run()) > 0) then + require('packer').sync() + end +end