summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-03-05 19:48:22 +0800
committerGitHub <noreply@github.com>2023-03-05 19:48:22 +0800
commit957ea431c23dd6cbaa512e6a67b4a25e2adf08e4 (patch)
tree334182bf2e730f8d422e855e120df9de94bed534 /src/config.rs
parentaadffb17a3cbbfc5e3c0dad4c8587eff79aaae9b (diff)
downloadaichat-957ea431c23dd6cbaa512e6a67b4a25e2adf08e4.tar.gz
refactor: rename config.no_highlight to highlight (#19)
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs
index 61a6998..802f376 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -27,8 +27,8 @@ pub struct Config {
#[serde(default)]
pub save: bool,
/// Whether to disable highlight
- #[serde(default)]
- pub no_highlight: bool,
+ #[serde(default = "highlight_value")]
+ pub highlight: bool,
/// Set proxy
pub proxy: Option<String>,
/// Used only for debugging
@@ -195,3 +195,7 @@ fn create_config_file(config_path: &Path) -> Result<()> {
std::fs::write(config_path, raw_config).with_context(|| "Failed to write to config file")?;
Ok(())
}
+
+fn highlight_value() -> bool {
+ true
+}