plugins/utility/fff-nvim: add fff.nvim module

Adds fff.nvim, a high-performance Rust-backed file picker for Neovim
with fuzzy search and frecency scoring. The Rust shared library is
built from source via rustPlatform.buildRustPackage and symlinked into
target/release/ where the plugin's lua loader expects it.

Toggle with vim.utility.fff-nvim.enable; pass arbitrary fff.setup()
options through vim.utility.fff-nvim.setupOpts.
This commit is contained in:
gustav-fff 2026-06-11 11:58:25 -07:00
commit 10aa76214c
7 changed files with 184 additions and 1 deletions

View file

@ -4,6 +4,7 @@
./ccc
./diffview
./direnv
./fff-nvim
./fzf-lua
./gestures
./harpoon

View file

@ -0,0 +1,25 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim.utility.fff-nvim;
in {
vim.lazy.plugins."fff-nvim" = mkIf cfg.enable {
package = "fff-nvim";
setupModule = "fff";
inherit (cfg) setupOpts;
cmd = [
"FFFFind"
"FFFScan"
"FFFRefreshGit"
"FFFClearCache"
"FFFHealth"
"FFFDebug"
"FFFOpenLog"
];
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./fff-nvim.nix
./config.nix
];
}

View file

@ -0,0 +1,80 @@
{
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) attrs;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.utility.fff-nvim = {
enable = mkEnableOption "fff.nvim, a fast file picker for Neovim";
setupOpts = mkPluginSetupOption "fff.nvim" {
base_path = mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = "Base directory for searching files. Defaults to the current working directory.";
};
prompt = mkOption {
type = lib.types.str;
default = " ";
description = "Prompt symbol used by the picker.";
};
title = mkOption {
type = lib.types.str;
default = "FFF Files";
description = "Title of the picker window.";
};
max_results = mkOption {
type = lib.types.int;
default = 100;
description = "Maximum number of results to display.";
};
max_threads = mkOption {
type = lib.types.int;
default = 4;
description = "Maximum number of background threads used for search.";
};
layout = mkOption {
type = attrs;
default = {};
description = "Layout settings (height, width, prompt_position, preview_position, ...).";
};
preview = mkOption {
type = attrs;
default = {};
description = "Preview settings (enabled, max_size, line_numbers, ...).";
};
keymaps = mkOption {
type = attrs;
default = {};
description = "Keymap overrides for the picker.";
};
icons = mkOption {
type = attrs;
default = {};
description = "Icon settings (requires a Nerd Font / icon provider).";
};
frecency = mkOption {
type = attrs;
default = {};
description = "Frecency database settings.";
};
debug = mkOption {
type = attrs;
default = {};
description = "Debug-related settings.";
};
};
};
}