summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index c3ebf3c..cce6b6a 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -24,6 +24,9 @@ pub struct Config {
/// Whether to persistently save chat messages
#[serde(default)]
pub save: bool,
+ /// Whether to highlight reply message
+ #[serde(default)]
+ pub highlight: bool,
/// Set proxy
pub proxy: Option<String>,
/// Used only for debugging
@@ -172,6 +175,14 @@ fn create_config_file(config_path: &Path) -> Result<()> {
raw_config.push_str("save: true\n");
}
+ let ans = Confirm::new("Whether to highlight reply message?")
+ .with_default(true)
+ .prompt()
+ .map_err(confirm_map_err)?;
+ if ans {
+ raw_config.push_str("highlight: true\n");
+ }
+
std::fs::write(config_path, raw_config)
.map_err(|err| anyhow!("Failed to write to config file, {err}"))?;
Ok(())