1
0
Fork
You've already forked fre.nvim
0
neovim integration for https://github.com/camdencheek/fre
  • Lua 100%
2025年07月25日 09:46:30 -04:00
lua (try to) gracefully shutdown spawning thread 2025年07月25日 09:46:30 -04:00
.editorconfig .editorconfig 2025年05月02日 17:17:04 -04:00
.stylua.toml add stylua config 2025年04月30日 22:37:37 -04:00
README.md async queue to ensure single fre process 2025年07月23日 10:46:17 -04:00

neovim integration for https://github.com/camdencheek/fre

Prerequisites

You need to have the fre command available

Setup and usage

Once set up, neovim will call fre behind the scenes to track the files you frequent.

Using https://github.com/folke/lazy.nvim

-- barebones config, will record paths on save
{
	"https://codeberg.org/FelipeLema/fre.nvim.git",
 dependencies={"nvim-lua/plenary.nvim"},
	opts = {},
	main="fre",
},

You can pick recorded files with require("fre").fzf_lua(), having https://github.com/ibhagwan/fzf-lua installed

-- with some customizations
{
	"https://codeberg.org/FelipeLema/fre.nvim.git",
 dependencies={"nvim-lua/plenary.nvim"},
	opts = {
		-- special location for `fre`
		fre_cmd = "/home/felipe/dev/fre/target/release/fre",
		-- can use other events to trigger recording a file
		events = { "BufEnter" }
	},
	config = function(_, opts)
		local fre = require "fre"
		fre.setup(opts)
		vim.keymap.set("n", "<leader>sr", function()
			-- fzf_lua() forwards options to FzfLua
			require("fre").fzf_lua { prompt = "FRC>",
 fzf_opts = {
 -- these options: a) prioritize the basename when you type b) preserve original order when narrowing
 ["--scheme"] = false,
 ["--tiebreak"] = "pathname,index",
 },
 }
		end, { silent = true, desc = "[R]ecent files" })
	end,
},