1
0
Fork 0
vdotfiles/nvim/lua/packer_init.lua

18 lines
543 B
Lua
Raw Normal View History

2022-12-26 01:31:15 +02:00
local ensure_packer = function()
local install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.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()
require('packer').startup(plugins)
if packer_bootstrap then
require('packer').sync()
return true
end
return false