diff --git a/codebook-lsp/src/lsp.rs b/codebook-lsp/src/lsp.rs index 4c88277..8d916a6 100644 --- a/codebook-lsp/src/lsp.rs +++ b/codebook-lsp/src/lsp.rs @@ -291,10 +291,10 @@ impl Backend { Some(doc) => doc, None => return, }; - // Convert the file URI to a local file path (if needed). + // Convert the file URI to a local file path. let file_path = doc.uri.to_file_path().unwrap_or_default(); info!("Spell-checking file: {:?}", file_path); - // 1) Perform spell-check (stubbed function below). + // 1) Perform spell-check. let spell_results = self.codebook.dictionary.spell_check( &doc.text, doc.language_id.as_deref(), diff --git a/codebook/src/downloader.rs b/codebook/src/downloader.rs index 58947c2..3de8f98 100644 --- a/codebook/src/downloader.rs +++ b/codebook/src/downloader.rs @@ -302,37 +302,6 @@ impl DictionaryDownloader { } } -// ===================== -// Example usage (comment out if you don't want a main): -// ===================== -// fn main() -> Result<(), Box> { -// let downloader = DictionaryDownloader::new( -// "https://raw.githubusercontent.com/blopker/dictionaries", -// "./dictionary_cache", -// ); -// -// // 1) Using the `get` method -// let info = downloader.get("en")?; -// println!( -// "[get] EN dictionary => dic: {}, aff: {}, stale: {}s", -// info.dic_local_path, info.aff_local_path, info.stale_seconds -// ); -// -// // 2) Using the download methods -// let results = downloader.download_dictionaries(vec!["de", "fr"]); -// for res in results { -// match res { -// Ok(info) => { -// for info in info { -// println!("Downloaded => {:?}", info); -// } -// }, -// Err(e) => eprintln!("Error: {}", e), -// } -// } -// Ok(()) -// } - // ===================== // Unit Tests // =====================