vim.api.nvim_create_autocmd("PackChanged", { callback = function(e) if e.data.spec.name ~= "fff.nvim" then return end if e.data.kind == "install" or e.data.kind == "update" then vim.print("Building fff binary.") vim.cmd.packadd { args = { e.data.spec.name }, bang = false } require("fff.download").download_or_build_binary( function() vim.print("Finished building fff binary.") end ) end end, }) vim.pack.add { "https://github.com/dmtrKovalenko/fff.nvim" } -- the plugin will automatically lazy load vim.g.fff = { lazy_sync = true, -- start syncing only when the picker is open debug = { enabled = true, show_scores = true, }, } vim.keymap.set("n", "ff", function() require("fff").find_files() end, { desc = "[FF]ind files" })