Add bootstrap for Paq

nvim --headless -u NONE -c 'lua require("bootstrap").bootstrap_paq()'

For install
This commit is contained in:
Yorick Barbanneau 2022-04-18 00:02:51 +02:00
parent dc5dfe9851
commit aa0176f411

View file

@ -0,0 +1,28 @@
local PKGS = {
"savq/paq-nvim";
-- List your packages here!
}
local function clone_paq()
local path = vim.fn.stdpath('data') .. '/site/pack/paqs/start/paq-nvim'
if vim.fn.empty(vim.fn.glob(path)) > 0 then
vim.fn.system {
'git',
'clone',
'--depth=1',
'https://github.com/savq/paq-nvim.git',
path
}
end
end
local function bootstrap_paq()
clone_paq()
-- Load Paq
vim.cmd('packadd paq-nvim')
local paq = require('paq')
-- Exit nvim after installing plugins
vim.cmd('autocmd User PaqDoneInstall quit')
-- Read and install packages
paq(PKGS)
paq.install()
end
return { bootstrap_paq = bootstrap_paq }