Add bootstrap for Paq
nvim --headless -u NONE -c 'lua require("bootstrap").bootstrap_paq()' For install
This commit is contained in:
parent
dc5dfe9851
commit
aa0176f411
1 changed files with 28 additions and 0 deletions
28
conf/nvim/lua/bootstrap.lua
Normal file
28
conf/nvim/lua/bootstrap.lua
Normal 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 }
|
Loading…
Add table
Add a link
Reference in a new issue