Fall back to 'paq.nvim' only when not on 'nixCats'
parent
1b57185b72
commit
4f011cf8ef
|
|
@ -1,8 +1,10 @@
|
|||
require("nixCatsUtils").setup({ non_nix_value = true }) -- https://github.com/BirdeeHub/nixCats-nvim/blob/77dffad8235eb77684fcb7599487c8e9f23d5b8f/templates/example/init.lua
|
||||
|
||||
require("vim")
|
||||
require("ftdetect")
|
||||
require("keymaps")
|
||||
require("highlight")
|
||||
require("paq-setup")
|
||||
require("paq-setup") -- when not on nixCats
|
||||
require("diagnostic")
|
||||
|
||||
-- vim.opt.background = "dark"
|
||||
|
|
|
|||
|
|
@ -35,6 +35,18 @@ function M.setup(v)
|
|||
paq(packages)
|
||||
paq.install()
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
once = true,
|
||||
callback = function()
|
||||
local pkgs_count = #require("paq").query("to_install")
|
||||
if pkgs_count < 1 then
|
||||
return
|
||||
end
|
||||
vim.notify(string.format("There are %d to install", pkgs_count))
|
||||
end,
|
||||
})
|
||||
|
||||
bootstrap_paq(vim.list_extend({ "savq/paq-nvim" }, v))
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,38 +1,4 @@
|
|||
-- Automate paq installation {{{
|
||||
local function clone_paq()
|
||||
local path = vim.fn.stdpath("data") .. "/site/pack/paqs/start/paq-nvim"
|
||||
local is_installed = vim.fn.empty(vim.fn.glob(path)) == 0
|
||||
if not is_installed then
|
||||
vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/savq/paq-nvim.git", path })
|
||||
return true
|
||||
end
|
||||
end
|
||||
local function bootstrap_paq(packages)
|
||||
local first_install = clone_paq()
|
||||
vim.cmd.packadd("paq-nvim")
|
||||
local paq = require("paq")
|
||||
if first_install then
|
||||
vim.notify("Installing plugins... If prompted, hit Enter to continue.")
|
||||
end
|
||||
paq(packages)
|
||||
paq.install()
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
once = true,
|
||||
callback = function()
|
||||
local pkgs_count = #require("paq").query("to_install")
|
||||
if pkgs_count < 1 then
|
||||
return
|
||||
end
|
||||
vim.notify(string.format("There are %d to install", pkgs_count))
|
||||
end,
|
||||
})
|
||||
|
||||
-- }}}
|
||||
|
||||
-- Set up paq plugins {{{
|
||||
bootstrap_paq({
|
||||
require("nixCatsUtils.catPacker").setup({
|
||||
{ "savq/paq-nvim" },
|
||||
{ "jinh0/eyeliner.nvim" },
|
||||
{ "ibhagwan/fzf-lua" },
|
||||
|
|
@ -77,4 +43,3 @@ bootstrap_paq({
|
|||
{ "zbirenbaum/copilot-cmp" },
|
||||
{ "qvalentin/helm-ls.nvim", ft = "helm" },
|
||||
})
|
||||
-- }}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue