1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-25 04:27:46 +01:00

nvim: bootstrap packer

This commit is contained in:
tiyn 2023-01-13 04:10:00 +01:00
parent 99760cad61
commit aabc0f208e

View File

@ -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'