bootstrap.lua (850B)
1 local function clone_paq() 2 local path = vim.fn.stdpath("data") .. "/site/pack/paqs/opt/paq-nvim" 3 local is_installed = vim.fn.empty(vim.fn.glob(path)) == 0 4 if not is_installed then 5 vim.fn.system { "git", "clone", "--depth=1", "https://github.com/savq/paq-nvim.git", path } 6 return true 7 end 8 end 9 10 local function bootstrap_paq(packages) 11 local first_install = clone_paq() 12 vim.cmd.packadd("paq-nvim") 13 local paq = require("paq") 14 if first_install then 15 vim.notify("Installing plugins... If prompted, hit Enter to continue.") 16 end 17 18 -- Read and install packages 19 paq(packages) 20 paq.install() 21 end 22 23 local first_install = clone_paq() 24 if first_install then 25 -- Set to exit nvim after installing plugins 26 vim.cmd("autocmd User PaqDoneInstall quit") 27 28 local plugins = require "plugins" 29 plugins.install() 30 else 31 vim.cmd.quit() 32 end