nvim-config

Log | Files | Refs | Submodules | README

commit ccf2282f48e60bb2d57f0f4d99c64d954c1e85b1
parent f95567c07db733fe95ba6f26a4b4e1c81ef6cf19
Author: Thomas Vigouroux <tomvig38@gmail.com>
Date:   Thu,  9 Dec 2021 13:07:29 +0100

fix(packer): use new-style bootstrapping process

Keeps us up to date.

Diffstat:
Mlua/plugins.lua | 18+++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/lua/plugins.lua b/lua/plugins.lua @@ -1,15 +1,15 @@ -- vim: et local execute = vim.api.nvim_command -local fn = vim.fn - -local install_path = fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim' +local fn = vim.fn +local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' +local packer_bootstrap = false if fn.empty(fn.glob(install_path)) > 0 then - execute('!git clone https://github.com/wbthomason/packer.nvim '..install_path) + packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) end -execute 'packadd packer.nvim' -return require"packer".startup(function(use) +local packer = require"packer" +return packer.startup(function(use) local function localuse(spec) local function path_trans(path) @@ -25,7 +25,7 @@ return require"packer".startup(function(use) end end - use {'wbthomason/packer.nvim', opt = true} + -- use {'wbthomason/packer.nvim', opt = true} -- Basic use { @@ -89,4 +89,8 @@ return require"packer".startup(function(use) -- filetypes use 'rhysd/vim-llvm' use 'tamarin-prover/editors' + + if packer_bootstrap then + packer.sync() + end end)