Migrate to vim.pack
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
-- PackChanged hooks must be registered before the first vim.pack.add() call,
|
||||
-- otherwise installs triggered during the initial startup would miss them.
|
||||
vim.api.nvim_create_autocmd("PackChanged", {
|
||||
callback = function(ev)
|
||||
local name, kind, path = ev.data.spec.name, ev.data.kind, ev.data.path
|
||||
if name == "telescope-fzf-native.nvim" and (kind == "install" or kind == "update") then
|
||||
vim.system({ "make" }, { cwd = path })
|
||||
elseif name == "nvim-treesitter" and (kind == "install" or kind == "update") then
|
||||
if not ev.data.active then
|
||||
vim.cmd.packadd("nvim-treesitter")
|
||||
end
|
||||
pcall(require("nvim-treesitter").update)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
require("plugins.theme")
|
||||
require("plugins.treesitter")
|
||||
require("plugins.blink")
|
||||
require("plugins.whichkey")
|
||||
require("plugins.lualine")
|
||||
require("plugins.telescope")
|
||||
require("plugins.neotree")
|
||||
require("plugins.conform")
|
||||
require("plugins.git")
|
||||
require("plugins.markdown")
|
||||
require("plugins.log-highlight")
|
||||
require("plugins.zig")
|
||||
Reference in New Issue
Block a user