Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lua/config/plugin_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ end

-- fff
local fff_ok, _ = pcall(function()
vim.api.nvim_create_autocmd("PackChanged", {
vim.api.nvim_create_autocmd("User", {
pattern = "PackChanged",
Comment on lines +150 to +151

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore the PackChanged event for vim.pack hooks

When vim.pack installs or updates fff.nvim (for example through SyncPkgs), this autocmd now listens for the User event instead of the actual PackChanged event, so the callback will not run and the fff binary still will not be downloaded. I checked the current Neovim pack/autocmd docs: PackChanged and PackChangedPre are first-class autocmd events, and the documented hook example uses vim.api.nvim_create_autocmd('PackChanged', ...) with this same ev.data shape.

Useful? React with 👍 / 👎.

callback = function(ev)
local name, kind = ev.data.spec.name, ev.data.kind
if name == "fff.nvim" and (kind == "install" or kind == "update") then
Expand Down
Loading