From aa0176f411356335892ea6ce9ece5c51b64ae1c6 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Mon, 18 Apr 2022 00:02:51 +0200 Subject: [PATCH] Add bootstrap for Paq nvim --headless -u NONE -c 'lua require("bootstrap").bootstrap_paq()' For install --- conf/nvim/lua/bootstrap.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 conf/nvim/lua/bootstrap.lua diff --git a/conf/nvim/lua/bootstrap.lua b/conf/nvim/lua/bootstrap.lua new file mode 100644 index 0000000..6f1ce16 --- /dev/null +++ b/conf/nvim/lua/bootstrap.lua @@ -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 }