Skip to main content

hjkl_picker/
lib.rs

1//! Fuzzy picker subsystem for hjkl-based apps.
2//!
3//! Provides the non-generic `Picker` harness driven by a `Box<dyn PickerLogic>`,
4//! built-in file (`FileSource`) and grep (`RgSource`) sources, a fuzzy scorer,
5//! and preview infrastructure. The `PickerLogic` trait allows apps to add custom
6//! sources without modifying picker internals.
7
8pub mod highlight;
9pub mod logic;
10pub mod picker;
11pub mod preview;
12pub mod render;
13pub mod score;
14pub mod source;
15
16// Flat re-exports for ergonomic use by consumers.
17pub use highlight::{PlainPreview, PreviewHighlighter};
18pub use logic::{PickerAction, PickerEvent, PickerLogic, RequeryMode};
19pub use picker::Picker;
20pub use preview::{PREVIEW_MAX_BYTES, PreviewSpans, build_preview_spans, load_preview};
21pub use render::{PreviewTheme, preview_pane};
22pub use score::score;
23pub use source::{
24    FileSource, GrepBackend, RgMatch, RgSource, detect_grep_backend, extract_json_string,
25    extract_json_u32, parse_grep_line, parse_rg_json_line,
26};