codebook 0.3.5

A code-aware spell checker library (dependency for codebook-lsp)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::sync::Arc;

use codebook::Codebook;

pub fn get_processor() -> Codebook {
    let config = Arc::new(codebook_config::CodebookConfig::default());
    config
        .add_ignore("**/ignore.txt")
        .expect("Should ignore file");
    Codebook::new(config).unwrap()
}

#[allow(dead_code)]
pub fn init_logging() {
    let _ = env_logger::builder().is_test(true).try_init();
}