allow bootstraping packer
This commit is contained in:
parent
10f5c07a9b
commit
0c25d5c867
@ -1,3 +1,16 @@
|
|||||||
|
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()
|
||||||
|
|
||||||
vim.cmd([[autocmd BufWritePost plugins.lua source <afile> | PackerCompile]])
|
vim.cmd([[autocmd BufWritePost plugins.lua source <afile> | PackerCompile]])
|
||||||
|
|
||||||
return require('packer').startup({function()
|
return require('packer').startup({function()
|
||||||
@ -83,6 +96,10 @@ return require('packer').startup({function()
|
|||||||
config = function() require'plugins/nvim-tree' end
|
config = function() require'plugins/nvim-tree' end
|
||||||
}
|
}
|
||||||
use 'justinmk/vim-sneak'
|
use 'justinmk/vim-sneak'
|
||||||
|
|
||||||
|
if packer_bootstrap then
|
||||||
|
require('packer').sync()
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
config = {
|
config = {
|
||||||
display = {
|
display = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user