From 01fff3c1ec218cc4722d61173fceb122026aaab7 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@clevo" Date: Fri, 29 Jul 2022 11:41:10 +0200 Subject: [PATCH] Add packer bootstrap --- roles/neovim/files/init.vim | 1 + roles/neovim/files/lua/packer.lua | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 roles/neovim/files/lua/packer.lua diff --git a/roles/neovim/files/init.vim b/roles/neovim/files/init.vim index 7c42367..3e87691 100644 --- a/roles/neovim/files/init.vim +++ b/roles/neovim/files/init.vim @@ -2,6 +2,7 @@ lua require('transition') lua require('encoding') lua require('remaps') lua require('spacetabs') +lua require('packer') lua require('colors') set runtimepath^=~/.vim runtimepath+=~/.vim/after diff --git a/roles/neovim/files/lua/packer.lua b/roles/neovim/files/lua/packer.lua new file mode 100644 index 0000000..5d7c35c --- /dev/null +++ b/roles/neovim/files/lua/packer.lua @@ -0,0 +1,17 @@ +local fn = vim.fn +local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' +if fn.empty(fn.glob(install_path)) > 0 then + packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) + vim.cmd [[packadd packer.nvim]] +end + +return require('packer').startup(function(use) + -- Packer can manage itself + use 'wbthomason/packer.nvim' + + -- Automatically set up your configuration after cloning packer.nvim + -- Put this at the end after all plugins + if packer_bootstrap then + require('packer').sync() + end +end)