Skip to main content

hyprcorrect_core/
lib.rs

1//! Core logic for hyprcorrect: configuration, the keystroke buffer,
2//! replacement planning, and the correction-provider interface.
3//!
4//! This crate has no GUI or platform dependencies. See `DESIGN.md` at
5//! the repository root for the architecture.
6
7pub mod buffer;
8pub mod chord;
9pub mod config;
10pub mod definitions;
11pub mod languagetool;
12pub mod llm;
13pub mod providers;
14pub mod replace;
15pub mod runtime;
16pub mod secrets;
17
18pub use buffer::{Buffer, Key, NearbyWord, Sentence, SentenceAtCaret, WordAtCaret};
19pub use chord::{Chord, ChordError};
20pub use config::{
21    Behavior, Config, ConfigError, DefinitionSource, Hotkeys, LanguageToolConfig, LlmConfig,
22    Privacy, ProviderId, Providers, ResetKeys,
23};
24pub use definitions::{define, define_online};
25pub use languagetool::{LanguageToolError, LanguageToolProvider};
26pub use llm::{LlmError, LlmProvider};
27pub use providers::{Context, Correction, CorrectionProvider, OfflineProvider};
28pub use replace::{Edit, plan_word_replacement};
29
30/// hyprcorrect's version string, surfaced by the CLI and the About pane.
31pub fn version() -> &'static str {
32    env!("CARGO_PKG_VERSION")
33}