Bootstrap packer
This commit is contained in:
parent
259fdcd1e8
commit
fb2a244c2b
|
@ -1,7 +1,7 @@
|
|||
require("vtimofei.plugins")
|
||||
require("vtimofei.set")
|
||||
require("vtimofei.remap")
|
||||
require("vtimofei.cmp")
|
||||
require("vtimofei.lsp")
|
||||
require("vtimofei.plugins")
|
||||
require("vtimofei.telescope")
|
||||
require("vtimofei.treesitter")
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
vim.cmd [[packadd packer.nvim]]
|
||||
|
||||
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()
|
||||
|
||||
return require('packer').startup(function(use)
|
||||
use 'wbthomason/packer.nvim'
|
||||
use 'folke/tokyonight.nvim'
|
||||
|
@ -22,4 +35,8 @@ return require('packer').startup(function(use)
|
|||
'nvim-telescope/telescope.nvim', branch = '0.1.x',
|
||||
requires = { {'nvim-lua/plenary.nvim'} }
|
||||
}
|
||||
|
||||
if packer_bootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue