nvim: bootstrap packer

master
tiyn 2 years ago
parent 99760cad61
commit aabc0f208e

@ -1,5 +1,19 @@
-- loadplugins
-- bootstrap packer
local ensure_packer = function()
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
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
-- load plugins with packer
return require("packer").startup(function(use)
-- automatic closing of brackets
@ -39,7 +53,9 @@ return require("packer").startup(function(use)
use 'norcalli/nvim-colorizer.lua'
-- package manager
use 'wbthomason/packer.nvim'
if packer_bootstrap then
require('packer').sync()
end
-- colorful brackets
use 'luochen1990/rainbow'

Loading…
Cancel
Save