chg: No need to auto-update plugins all the time
This commit is contained in:
parent
032a6cd807
commit
2337ac3682
1 changed files with 2 additions and 15 deletions
17
paq.lua
17
paq.lua
|
@ -8,31 +8,18 @@ local function clone_paq()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Automatically install new packages at startup
|
||||||
local function bootstrap_paq(packages)
|
local function bootstrap_paq(packages)
|
||||||
local first_install = clone_paq()
|
local first_install = clone_paq()
|
||||||
vim.cmd.packadd("paq-nvim")
|
vim.cmd.packadd("paq-nvim")
|
||||||
local paq = require("paq")
|
local paq = require("paq")
|
||||||
|
paq(packages)
|
||||||
if first_install then
|
if first_install then
|
||||||
vim.notify("Installing plugins... If prompted, hit Enter to continue.")
|
vim.notify("Installing plugins... If prompted, hit Enter to continue.")
|
||||||
paq.install()
|
paq.install()
|
||||||
end
|
end
|
||||||
paq(packages)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Automatically install new packages at startup
|
|
||||||
vim.api.nvim_create_autocmd("VimEnter", {
|
|
||||||
once = true,
|
|
||||||
callback = function()
|
|
||||||
local paq = require("paq")
|
|
||||||
local pkgs_count = #paq.query("to_install")
|
|
||||||
if pkgs_count < 1 then
|
|
||||||
paq.update()
|
|
||||||
return end
|
|
||||||
vim.notify(string.format("There are %d plugins to install", pkgs_count))
|
|
||||||
paq.install()
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Load plugin via paq-nvim
|
-- Load plugin via paq-nvim
|
||||||
bootstrap_paq {
|
bootstrap_paq {
|
||||||
"savq/paq-nvim",
|
"savq/paq-nvim",
|
||||||
|
|
Loading…
Reference in a new issue