mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-28 05:57:45 +01:00
nvim: bootstrap packer
This commit is contained in:
parent
99760cad61
commit
aabc0f208e
@ -1,5 +1,19 @@
|
|||||||
-- loadplugins
|
-- 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
|
-- load plugins with packer
|
||||||
return require("packer").startup(function(use)
|
return require("packer").startup(function(use)
|
||||||
-- automatic closing of brackets
|
-- automatic closing of brackets
|
||||||
@ -39,7 +53,9 @@ return require("packer").startup(function(use)
|
|||||||
use 'norcalli/nvim-colorizer.lua'
|
use 'norcalli/nvim-colorizer.lua'
|
||||||
|
|
||||||
-- package manager
|
-- package manager
|
||||||
use 'wbthomason/packer.nvim'
|
if packer_bootstrap then
|
||||||
|
require('packer').sync()
|
||||||
|
end
|
||||||
|
|
||||||
-- colorful brackets
|
-- colorful brackets
|
||||||
use 'luochen1990/rainbow'
|
use 'luochen1990/rainbow'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user