summaryrefslogtreecommitdiffstats
path: root/src/conf/conf.rs
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2020-07-26 07:23:57 +0200
committerCanop <cano.petrole@gmail.com>2020-07-26 07:23:57 +0200
commit4f2ace728427c4d37cd3996570d14791a5415a20 (patch)
tree5d493c15da992bebaaba5ee9a2eb61964edc6503 /src/conf/conf.rs
parent9a32d3df4171a5d75be4d6bd80c424f14c02bacc (diff)
"syntax_theme" preference in config file
to choose one of the default syntect themes
Diffstat (limited to 'src/conf/conf.rs')
-rw-r--r--src/conf/conf.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/conf/conf.rs b/src/conf/conf.rs
index 4c008f5..2d592d0 100644
--- a/src/conf/conf.rs
+++ b/src/conf/conf.rs
@@ -36,6 +36,7 @@ pub struct Conf {
pub disable_mouse_capture: bool,
pub cols_order: Option<Cols>,
pub ext_colors: ExtColorMap,
+ pub syntax_theme: Option<String>,
}
fn string_field(value: &Value, field_name: &str) -> Option<String> {
@@ -114,6 +115,8 @@ impl Conf {
}
// date/time format
self.date_time_format = string_field(&root, "date_time_format");
+ // reading the optional theme for syntect
+ self.syntax_theme = string_field(&root, "syntax_theme");
// mouse capture
if let Some(mouse_capture) = bool_field(&root, "capture_mouse") {
self.disable_mouse_capture = !mouse_capture;