Module microscope

Module microscope 

Source
Expand description

Microscope - Fuzzy finder module

This module provides a Microscope-like fuzzy finder system with:

  • Trait-based picker system for extensibility
  • Nucleo-powered streaming fuzzy matching
  • Helix-style bottom-anchored layout with preview
  • Modal editing (Normal/Insert modes) in prompt
  • Multiple built-in pickers (files, buffers, grep, etc.)

§Streaming Architecture

The matcher uses nucleo’s Nucleo<T> API for non-blocking fuzzy matching:

  • Items are pushed via Injector from background tasks
  • tick() processes matches without blocking input
  • snapshot() retrieves current results instantly

§Helix-Style Layout

+---------------------------------------------------------------+
|                      Editor Content                            |
+------------------ y = screen_height - picker_height -----------+
| Results (40%)                    | Preview (60%)               |
+----------------------------------+------------------------------+
| status: 4/128 files                    <CR> Open | <Esc> Close |
+---------------------------------------------------------------+

Re-exports§

pub use item::MicroscopeData;
pub use item::MicroscopeItem;
pub use layout::LayoutBounds;
pub use layout::LayoutConfig;
pub use layout::PanelBounds;
pub use layout::calculate_layout;
pub use layout::visible_item_count;
pub use matcher::MatcherItem;
pub use matcher::MatcherStatus;
pub use matcher::MicroscopeMatcher;
pub use matcher::push_item;
pub use matcher::push_items;
pub use picker::BufferInfo;
pub use picker::MicroscopeAction;
pub use picker::Picker;
pub use picker::PickerContext;
pub use picker::PickerRegistry;
pub use state::LoadingState;
pub use state::MicroscopeLayout;
pub use state::MicroscopeState;
pub use state::PreviewContent;
pub use state::PromptMode;
pub use state::StyledSpan;

Modules§

item
Microscope item types
layout
Helix-style layout calculations for microscope
matcher
Streaming fuzzy matcher using Nucleo
picker
Picker trait and infrastructure
state
Microscope state management