pub struct RipgrepContextConfig {
pub root_path: PathBuf,
pub include_patterns: Vec<String>,
pub exclude_patterns: Vec<String>,
pub max_file_size: usize,
pub case_insensitive: bool,
pub context_lines: usize,
}Expand description
Ripgrep context provider configuration
Fields§
§root_path: PathBufRoot directory to search
include_patterns: Vec<String>Include patterns (glob syntax: [“/*.rs”, “/*.md”])
exclude_patterns: Vec<String>Exclude patterns (glob syntax: [“/target/”, “/node_modules/”])
max_file_size: usizeMaximum file size in bytes (default: 1MB)
case_insensitive: boolCase insensitive search (default: true)
context_lines: usizeNumber of context lines before/after match (default: 2)
Implementations§
Source§impl RipgrepContextConfig
impl RipgrepContextConfig
Sourcepub fn with_include_patterns(self, patterns: Vec<String>) -> Self
pub fn with_include_patterns(self, patterns: Vec<String>) -> Self
Set include patterns
Sourcepub fn with_exclude_patterns(self, patterns: Vec<String>) -> Self
pub fn with_exclude_patterns(self, patterns: Vec<String>) -> Self
Set exclude patterns
Sourcepub fn with_max_file_size(self, size: usize) -> Self
pub fn with_max_file_size(self, size: usize) -> Self
Set max file size
Sourcepub fn with_case_insensitive(self, enabled: bool) -> Self
pub fn with_case_insensitive(self, enabled: bool) -> Self
Set case sensitivity
Sourcepub fn with_context_lines(self, lines: usize) -> Self
pub fn with_context_lines(self, lines: usize) -> Self
Set context lines
Trait Implementations§
Source§impl Clone for RipgrepContextConfig
impl Clone for RipgrepContextConfig
Source§fn clone(&self) -> RipgrepContextConfig
fn clone(&self) -> RipgrepContextConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RipgrepContextConfig
impl RefUnwindSafe for RipgrepContextConfig
impl Send for RipgrepContextConfig
impl Sync for RipgrepContextConfig
impl Unpin for RipgrepContextConfig
impl UnsafeUnpin for RipgrepContextConfig
impl UnwindSafe for RipgrepContextConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more