From 1bb3b778adf6d03c10898f17858c6881afcd3d1f Mon Sep 17 00:00:00 2001 From: Wojciech Kępka Date: Fri, 18 Jun 2021 15:41:49 +0200 Subject: Don't derive `Default` for `GlobalConfig` (#297) We shouldn't derive Default because `lsp_progress` by default should be turned on (opt out).--- helix-term/src/config.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'helix-term') diff --git a/helix-term/src/config.rs b/helix-term/src/config.rs index d2bbe84f..e5e17753 100644 --- a/helix-term/src/config.rs +++ b/helix-term/src/config.rs @@ -5,11 +5,16 @@ use serde::{de::Error as SerdeError, Deserialize, Serialize}; use crate::keymap::{parse_keymaps, Keymaps}; -#[derive(Default)] pub struct GlobalConfig { pub lsp_progress: bool, } +impl Default for GlobalConfig { + fn default() -> Self { + Self { lsp_progress: true } + } +} + #[derive(Default)] pub struct Config { pub global: GlobalConfig, -- cgit v1.2.3-70-g09d2