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

24 lines
692 B
Lua
Raw Normal View History

2023-01-18 19:18:09 +02:00
local packer_init = {}
packer_init.init = function(plugins)
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()
2022-12-26 01:31:15 +02:00
return true
end
return false
end
2023-01-18 19:18:09 +02:00
return packer_init