What
lua/config/plugin_config.lua lines 149–161 register an autocmd to download/build the fff.nvim binary after install or update:
local fff_ok, _ = pcall(function()
vim.api.nvim_create_autocmd("PackChanged", {
callback = function(ev)
local name, kind = ev.data.spec.name, ev.data.kind
if name == "fff.nvim" and (kind == "install" or kind == "update") then
if not ev.data.active then
vim.cmd.packadd("fff.nvim")
end
require("fff.download").download_or_build_binary()
end
end,
})
end)
Where
lua/config/plugin_config.lua, lines 149–161.
Why it matters
vim.pack fires plugin lifecycle notifications as User events, not top-level Neovim events. The correct registration pattern is:
vim.api.nvim_create_autocmd("User", {
pattern = "PackChanged",
callback = ...,
})
Because PackChanged is not a built-in top-level Neovim event, nvim_create_autocmd("PackChanged", ...) creates an autocmd that is never fired. The pcall wrapper silently swallows any creation error, so startup succeeds — but the callback never runs. As a result, after :SyncPkgs installs or updates fff.nvim, require("fff.download").download_or_build_binary() is never called and the native binary is never built. fff will appear to load (the Lua side works) but find_files() / live_grep() will fail at runtime because the binary is missing.
Recommended action
Change the event registration to a User autocmd with a pattern:
local fff_ok, _ = pcall(function()
vim.api.nvim_create_autocmd("User", {
pattern = "PackChanged",
callback = function(ev)
local name, kind = ev.data.spec.name, ev.data.kind
if name == "fff.nvim" and (kind == "install" or kind == "update") then
if not ev.data.active then
vim.cmd.packadd("fff.nvim")
end
require("fff.download").download_or_build_binary()
end
end,
})
end)
Also worth verifying the exact field names (ev.data.spec.name, ev.data.kind, ev.data.active) against the current vim.pack event payload, as the API is experimental and the payload shape may have changed.
As an immediate workaround, run :lua require("fff.download").download_or_build_binary() manually after each :SyncPkgs.
What
lua/config/plugin_config.lualines 149–161 register an autocmd to download/build the fff.nvim binary after install or update:Where
lua/config/plugin_config.lua, lines 149–161.Why it matters
vim.packfires plugin lifecycle notifications as User events, not top-level Neovim events. The correct registration pattern is:Because
PackChangedis not a built-in top-level Neovim event,nvim_create_autocmd("PackChanged", ...)creates an autocmd that is never fired. Thepcallwrapper silently swallows any creation error, so startup succeeds — but the callback never runs. As a result, after:SyncPkgsinstalls or updatesfff.nvim,require("fff.download").download_or_build_binary()is never called and the native binary is never built.fffwill appear to load (the Lua side works) butfind_files()/live_grep()will fail at runtime because the binary is missing.Recommended action
Change the event registration to a
Userautocmd with a pattern:Also worth verifying the exact field names (
ev.data.spec.name,ev.data.kind,ev.data.active) against the currentvim.packevent payload, as the API is experimental and the payload shape may have changed.As an immediate workaround, run
:lua require("fff.download").download_or_build_binary()manually after each:SyncPkgs.