pub trait ParserConfig {
// Provided methods
fn enable_glob(&self) -> bool { ... }
fn enable_extension(&self) -> bool { ... }
fn enable_exclude(&self) -> bool { ... }
fn enable_path_segments(&self) -> bool { ... }
fn enable_type_filter(&self) -> bool { ... }
fn enable_git_status(&self) -> bool { ... }
fn enable_location(&self) -> bool { ... }
fn is_glob_pattern(&self, token: &str) -> bool { ... }
fn parse_custom<'a>(&self, _input: &'a str) -> Option<Constraint<'a>> { ... }
}Expand description
Parser configuration trait - allows different picker types to customize parsing
Provided Methods§
fn enable_glob(&self) -> bool
Sourcefn enable_extension(&self) -> bool
fn enable_extension(&self) -> bool
Should parse extension shortcuts (e.g., *.rs)
Sourcefn enable_exclude(&self) -> bool
fn enable_exclude(&self) -> bool
Should parse exclusion patterns (e.g., !test)
Sourcefn enable_path_segments(&self) -> bool
fn enable_path_segments(&self) -> bool
Should parse path segments (e.g., /src/)
Sourcefn enable_type_filter(&self) -> bool
fn enable_type_filter(&self) -> bool
Should parse type constraints (e.g., type:rust)
Sourcefn enable_git_status(&self) -> bool
fn enable_git_status(&self) -> bool
Should parse git status (e.g., status:modified)
Sourcefn enable_location(&self) -> bool
fn enable_location(&self) -> bool
Should parse location suffixes (e.g., file:12, file:12:4) Disabled for grep modes where colon-number patterns like localhost:8080 are search text, not file locations.
Sourcefn is_glob_pattern(&self, token: &str) -> bool
fn is_glob_pattern(&self, token: &str) -> bool
Determine whether a token should be treated as a glob constraint.
The default implementation delegates to zlob::has_wildcards with
RECOMMENDED flags, which recognises *, ?, [, {…} etc.
Override this in configs where some wildcard characters are common
in search text (e.g. grep mode where ? and [ appear in code).
Sourcefn parse_custom<'a>(&self, _input: &'a str) -> Option<Constraint<'a>>
fn parse_custom<'a>(&self, _input: &'a str) -> Option<Constraint<'a>>
Custom constraint parsers for picker-specific needs