24ce8f3Migrate '.vim/plugin' to neovime3d9612Remove vim yin/yang colorschemes05986a3Migrate '.vim/ftplugin' to neovim05bc2ecMigrate vim snippets to neovim (LuaSnip)128ae8eMigrate '.vim/ftdetect/prolog' to neovimf3188f7Migrate '.vim/after/syntax' to neovim85d56f9Migrate vim init config to neovimafca2caMigrate '.vim/after' to neovimd6875c9Add 'eslint_d' PID to 'nvim-lint' config568e45fRemove jira aliases78fa170Disable 'xdg-user-dirs' by default5216f79Alias bash 'history' command to 'h'0f29dc3Add neovim dependencies to flakec901a1ctestdc4ebfcMerge commit '490998275cbdc5ff032d4a39794bf850f4bfefec'73fd4afAdd neovim 'auto-session' plugin setupff47da9Add minimal readme to my neovim configuration6dff3ebAdd minimal readme to my neovim configurationc94ccd3Remove neovim lazy load related config75ca003Fall back to 'paq.nvim' only when not on 'nixCats'78094a0Add 'nixCatsUtils' from 'nixCats'6e81624Add neovim packages to 'nixCats' flake6ded0b1Add minimal 'nixCats' flake templated0550b3Link NixOS repo in dotfiles repository git-subtree-dir: dots git-subtree-split:24ce8f39af
54 lines
1.9 KiB
Lua
54 lines
1.9 KiB
Lua
-- Source: https://github.com/BirdeeHub/nixCats-nvim/blob/main/templates/example/lua/nixCatsUtils/catPacker.lua
|
|
--[[
|
|
This directory is the luaUtils template.
|
|
You can choose what things from it that you would like to use.
|
|
And then delete the rest.
|
|
Everything in this directory is optional.
|
|
--]]
|
|
|
|
local M = {}
|
|
-- NOTE: This function is for defining a paq.nvim fallback method of downloading plugins
|
|
-- when nixCats was not used to install your config.
|
|
-- If you only ever load your config using nixCats, you don't need this file.
|
|
|
|
-- it literally just only runs it when not on nixCats
|
|
-- all neovim package managers that use the regular plugin loading scheme
|
|
-- can be used this way, just do whatever the plugin manager needs to put it in the
|
|
-- opt directory for lazy loading, and add the build steps so that when theres no nix the steps are ran
|
|
function M.setup(v)
|
|
if not vim.g[ [[nixCats-special-rtp-entry-nixCats]] ] then
|
|
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,
|
|
})
|
|
|
|
bootstrap_paq(vim.list_extend({ "savq/paq-nvim" }, v))
|
|
end
|
|
end
|
|
return M
|