pub struct ConfigSettings {
pub dictionaries: Vec<String>,
pub words: Vec<String>,
pub flag_words: Vec<String>,
pub include_paths: Vec<String>,
pub ignore_paths: Vec<String>,
pub ignore_patterns: Vec<String>,
pub use_global: bool,
pub min_word_length: usize,
pub include_tags: Vec<String>,
pub exclude_tags: Vec<String>,
}Fields§
§dictionaries: Vec<String>List of dictionaries to use for spell checking
words: Vec<String>Custom allowlist of words
flag_words: Vec<String>Words that should always be flagged
include_paths: Vec<String>Glob patterns for paths to include
ignore_paths: Vec<String>Glob patterns for paths to ignore
ignore_patterns: Vec<String>Regex patterns for text to ignore
use_global: boolWhether to use global configuration
min_word_length: usizeMinimum word length to check (words shorter than this are ignored)
Tag prefixes to include (if non-empty, only matching tags are checked)
Tag prefixes to exclude (takes precedence over include_tags)
Implementations§
Source§impl ConfigSettings
impl ConfigSettings
Sourcepub fn merge(&mut self, other: ConfigSettings)
pub fn merge(&mut self, other: ConfigSettings)
Merge another config settings into this one, sorting and deduplicating all collections
Sourcepub fn sort_and_dedup(&mut self)
pub fn sort_and_dedup(&mut self)
Sort and deduplicate all collections in the config
Source§impl ConfigSettings
impl ConfigSettings
Sourcepub fn should_check_tag(&self, tag: &str) -> bool
pub fn should_check_tag(&self, tag: &str) -> bool
Determine whether a capture tag should be spell-checked based on include_tags and exclude_tags. exclude_tags takes precedence.
Sourcepub fn insert_word(&mut self, word: &str) -> bool
pub fn insert_word(&mut self, word: &str) -> bool
Insert a word into the allowlist, returning true when it was newly added.
Sourcepub fn insert_ignore(&mut self, file: &str) -> bool
pub fn insert_ignore(&mut self, file: &str) -> bool
Insert a path into the ignore list, returning true when it was newly added.
Sourcepub fn insert_include(&mut self, file: &str) -> bool
pub fn insert_include(&mut self, file: &str) -> bool
Insert a path into the include list, returning true when it was newly added.
Sourcepub fn dictionary_ids(&self) -> Vec<String>
pub fn dictionary_ids(&self) -> Vec<String>
Resolve configured dictionary IDs, providing a default when none are set.
Sourcepub fn should_include_path(&self, path: &Path) -> bool
pub fn should_include_path(&self, path: &Path) -> bool
Determine whether a path should be included based on the configured glob patterns.
Sourcepub fn should_ignore_path(&self, path: &Path) -> bool
pub fn should_ignore_path(&self, path: &Path) -> bool
Determine whether a path should be ignored based on the configured glob patterns.
Sourcepub fn is_allowed_word(&self, word: &str) -> bool
pub fn is_allowed_word(&self, word: &str) -> bool
Check if a word is explicitly allowed.
Sourcepub fn should_flag_word(&self, word: &str) -> bool
pub fn should_flag_word(&self, word: &str) -> bool
Check if a word should be flagged.
Sourcepub fn min_word_length(&self) -> usize
pub fn min_word_length(&self) -> usize
Retrieve the configured minimum word length.
Trait Implementations§
Source§impl Clone for ConfigSettings
impl Clone for ConfigSettings
Source§fn clone(&self) -> ConfigSettings
fn clone(&self) -> ConfigSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more