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: bool
Whether 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: bool
Whether 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§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more