Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ signal-hook-registry = "1.4"
zlob = { version = "=1.6.0-dev.7" }

mlua = { version = "0.11.1", features = ["module", "luajit"] }
neo_frizbee = { version = "0.10.4", features = ["match_end_col"] }
neo_frizbee = { version = "0.11.0", features = ["match_end_col"] }
notify = { version = "9.0.0-rc.3" }
notify-debouncer-full = { package = "fff-notify-debouncer-full", version = "0.9.4" }
once_cell = "1.20.2"
Expand Down
2 changes: 2 additions & 0 deletions crates/fff-core/src/grep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1633,6 +1633,7 @@ fn fuzzy_grep_search<'a>(
max_typos: Some(max_typos as u16),
sort: false,
scoring,
..Default::default()
},
);

Expand Down Expand Up @@ -2363,6 +2364,7 @@ mod tests {
exact_match_bonus: 100,
..neo_frizbee::Scoring::default()
},
..Default::default()
};
let min_matched = needle.len().saturating_sub(1).max(1); // 5
let max_match_span = needle.len() + 4; // 10
Expand Down
2 changes: 2 additions & 0 deletions crates/fff-core/src/score.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ pub(crate) fn fuzzy_match_and_score_dirs<'a>(
matching_case_bonus: if has_uppercase { 4 } else { 0 },
..Default::default()
},
..Default::default()
};

let path_matches = match_fuzzy_parts_dirs(
Expand Down Expand Up @@ -509,6 +510,7 @@ fn match_and_score_in_arena<'a>(
matching_case_bonus: if has_uppercase { 4 } else { 0 },
..Default::default()
},
..Default::default()
};

let path_matches = match_fuzzy_parts(
Expand Down
16 changes: 1 addition & 15 deletions crates/fff-nvim/benches/fuzzy_search_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use fff::{
use std::path::PathBuf;
use std::time::Duration;

/// Initialize tracing to output to console
fn init_tracing() {
// use tracing_subscriber::EnvFilter;
// use tracing_subscriber::fmt;
Expand All @@ -22,7 +21,6 @@ fn init_tracing() {
// .try_init();
}

/// Initialize FilePicker using shared state
fn init_file_picker_internal(
path: &str,
shared_picker: &SharedFilePicker,
Expand All @@ -41,7 +39,6 @@ fn init_file_picker_internal(
.map_err(|e| format!("Failed to create FilePicker: {:?}", e))
}

/// Helper function to wait for scanning to complete and get file count
fn wait_for_scan_completion(
shared_picker: &SharedFilePicker,
timeout_secs: u64,
Expand Down Expand Up @@ -100,20 +97,10 @@ fn wait_for_scan_completion(
));
}

std::thread::sleep(Duration::from_millis(100));
std::thread::sleep(Duration::from_millis(50));
}
}

/// Clean up shared state
fn cleanup_shared_state(shared_picker: &SharedFilePicker) {
if let Ok(mut picker_guard) = shared_picker.write() {
if let Some(mut picker) = picker_guard.take() {
picker.stop_background_monitor();
}
}
}

/// Initialize FilePicker once and return shared state
fn setup_once() -> Result<(SharedFilePicker, SharedFrecency), String> {
init_tracing();

Expand Down Expand Up @@ -145,7 +132,6 @@ fn setup_once() -> Result<(SharedFilePicker, SharedFrecency), String> {
Ok((shared_picker, shared_frecency))
}

/// Benchmark for searching with various query patterns
fn bench_search_queries(c: &mut Criterion) {
let (sp, _sf) = match setup_once() {
Ok(result) => result,
Expand Down
Loading