diff options
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 450ab09e..b88723f5 100644 --- a/src/config.rs +++ b/src/config.rs @@ -277,6 +277,10 @@ pub struct Config { /// Hide cursor when typing #[serde(default)] hide_cursor_when_typing: bool, + + /// Live config reload + #[serde(default)] + live_config_reload: bool, } fn default_padding() -> Delta { @@ -329,6 +333,7 @@ impl Default for Config { visual_bell: Default::default(), env: Default::default(), hide_cursor_when_typing: Default::default(), + live_config_reload: Default::default(), padding: default_padding(), } } @@ -1177,6 +1182,12 @@ impl Config { self.hide_cursor_when_typing } + /// Live config reload + #[inline] + pub fn live_config_reload(&self) -> bool { + self.live_config_reload + } + pub fn load_from<P: Into<PathBuf>>(path: P) -> Result<Config> { let path = path.into(); let raw = Config::read_file(path.as_path())?; |