1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
5#[serde(default)]
6pub struct TuiConfig {
7 pub syntax_highlighting: bool,
9
10 pub theme: String,
12
13 pub line_numbers: bool,
15
16 pub mouse_support: bool,
18
19 pub scroll_speed: usize,
21
22 pub max_history: usize,
24
25 pub auto_save_enabled: bool,
27 pub auto_save_interval_minutes: u32,
29 pub auto_save_dir: Option<std::path::PathBuf>,
31}
32
33impl Default for TuiConfig {
34 fn default() -> Self {
35 Self {
36 syntax_highlighting: true,
37 theme: "base16-ocean.dark".to_string(),
38 line_numbers: true,
39 mouse_support: true,
40 scroll_speed: 3,
41 max_history: 1000,
42 auto_save_enabled: true,
43 auto_save_interval_minutes: 5,
44 auto_save_dir: None,
45 }
46 }
47}