High-performance fuzzy matching for Neovim, powered by the Rust frizbee library.
The plugin consists of:
- A native Rust backend (
frizbee_nvim) compiled to a shared library. - A Lua wrapper (
require('frizbee')) that loads the backend automatically and exposes a stable API.
{
"disrupted/frizbee.nvim",
build = "cargo build --release",
}The backend is loaded lazily on first call; there is no startup cost.
local frizbee = require('frizbee')Fuzzy-match query against an array of strings. Returns ranked results.
Parameters
| Name | Type | Description |
|---|---|---|
query |
string |
The search query |
texts |
string[] |
Array of candidate strings |
opts |
table|nil |
Options (see below) |
Options
| Field | Type | Default | Description |
|---|---|---|---|
max_typos |
integer|nil |
0 |
Max allowed missing chars. nil = unlimited. |
limit |
integer|nil |
nil |
Max results to return. nil = all. |
sort |
boolean|nil |
true |
Sort by score descending. |
with_positions |
boolean|nil |
false |
Include match positions. |
case_sensitive |
boolean|nil |
false |
Case-sensitive matching. |
Returns table[] — array of match objects:
| Field | Type | Description |
|---|---|---|
index |
integer |
1-based index into texts |
score |
number |
Match score (higher = better) |
exact |
boolean |
Whether the match is exact |
positions |
integer[]|nil |
1-based positions (only with with_positions = true) |
Empty query: returns all items with score = 0 and exact = false,
capped by limit.
Example
local matches = frizbee.match("src", {
"src/main.rs",
"src/lib.rs",
"Cargo.toml",
"README.md",
}, { limit = 10 })
for _, m in ipairs(matches) do
print(m.index, m.score, m.exact)
endReturn 1-based match positions for a single query/text pair.
Parameters
| Name | Type | Description |
|---|---|---|
query |
string |
The search query |
text |
string |
A single candidate string |
opts |
table|nil |
Same options as match() (only max_typos, case_sensitive used) |
Returns integer[] of 1-based positions, or nil if no match or empty
query.
Example
local pos = frizbee.match_indices("fb", "fooBar")
-- pos = { 1, 4 }:checkhealth frizbeeReports platform, library extension, searched paths, and native module status.