pub struct TreeSitterProcessor {
pub split_graphemes: bool,
pub exclude_kinds: Option<HashSet<String>>,
pub include_kinds: Option<HashSet<String>>,
pub strip_whitespace: bool,
}Expand description
The configuration options for processing tree-sitter output.
Fields§
§split_graphemes: boolWhether we should split the nodes graphemes.
If this is disabled, then the direct tree-sitter nodes will be used and diffs will be less granular. This has the advantage of being faster and using less memory.
exclude_kinds: Option<HashSet<String>>The kinds of nodes to exclude from processing. This takes precedence over include_kinds.
This is a set of strings that correspond to the tree sitter node types.
include_kinds: Option<HashSet<String>>The kinds of nodes to explicitly include when processing. The nodes specified here will be overridden by the
nodes specified in exclude_kinds.
This is a set of strings that correspond to the tree sitter node types.
strip_whitespace: boolWhether to strip whitespace when processing node text.
Whitespace includes whitespace characters and newlines. This can provide much more accurate diffs that do not account for line breaks. This is useful especially for more text heavy documents like markdown files.
Implementations§
Trait Implementations§
source§impl Clone for TreeSitterProcessor
impl Clone for TreeSitterProcessor
source§fn clone(&self) -> TreeSitterProcessor
fn clone(&self) -> TreeSitterProcessor
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for TreeSitterProcessor
impl Debug for TreeSitterProcessor
source§impl Default for TreeSitterProcessor
impl Default for TreeSitterProcessor
source§impl<'de> Deserialize<'de> for TreeSitterProcessorwhere
TreeSitterProcessor: Default,
impl<'de> Deserialize<'de> for TreeSitterProcessorwhere
TreeSitterProcessor: Default,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for TreeSitterProcessor
impl PartialEq for TreeSitterProcessor
source§fn eq(&self, other: &TreeSitterProcessor) -> bool
fn eq(&self, other: &TreeSitterProcessor) -> bool
self and other values to be equal, and is used
by ==.