Fall back to 'paq.nvim' only when not on 'nixCats'
parent
b6d3015559
commit
211da54bcf
|
|
@ -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("vim")
|
||||||
require("ftdetect")
|
require("ftdetect")
|
||||||
require("keymaps")
|
require("keymaps")
|
||||||
require("highlight")
|
require("highlight")
|
||||||
require("paq-setup")
|
require("paq-setup") -- when not on nixCats
|
||||||
require("diagnostic")
|
require("diagnostic")
|
||||||
|
|
||||||
-- vim.opt.background = "dark"
|
-- vim.opt.background = "dark"
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,18 @@ function M.setup(v)
|
||||||
paq(packages)
|
paq(packages)
|
||||||
paq.install()
|
paq.install()
|
||||||
end
|
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))
|
bootstrap_paq(vim.list_extend({ "savq/paq-nvim" }, v))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,4 @@
|
||||||
-- Automate paq installation {{{
|
require("nixCatsUtils.catPacker").setup({
|
||||||
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({
|
|
||||||
{ "savq/paq-nvim" },
|
{ "savq/paq-nvim" },
|
||||||
{ "jinh0/eyeliner.nvim" },
|
{ "jinh0/eyeliner.nvim" },
|
||||||
{ "ibhagwan/fzf-lua" },
|
{ "ibhagwan/fzf-lua" },
|
||||||
|
|
@ -77,4 +43,3 @@ bootstrap_paq({
|
||||||
{ "zbirenbaum/copilot-cmp" },
|
{ "zbirenbaum/copilot-cmp" },
|
||||||
{ "qvalentin/helm-ls.nvim", ft = "helm" },
|
{ "qvalentin/helm-ls.nvim", ft = "helm" },
|
||||||
})
|
})
|
||||||
-- }}}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue