settings_model/
text_assistance.rs1pub const SETTINGS_SECTION: &str = "text_assistance";
5
6#[cfg_attr(feature = "model", derive(tilo_resource::Model))]
7#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
8#[cfg_attr(feature = "model", model(defaults))]
9pub struct TextAssistancePrefs {
10 pub check_spelling: bool,
12 pub auto_correct: bool,
14 #[serde(default)]
16 pub spelling_language: String,
17}
18
19impl Default for TextAssistancePrefs {
20 fn default() -> Self {
21 Self {
22 check_spelling: true,
23 auto_correct: true,
24 spelling_language: String::new(),
25 }
26 }
27}
28
29impl crate::SettingsSchema for TextAssistancePrefs {
30 const SCOPE: crate::Scope = crate::Scope::Shared(SETTINGS_SECTION);
31}
32
33#[cfg(feature = "model")]
35#[tilo_resource::resource(kind = "settings.text-assistance")]
36impl TextAssistancePrefs {}