From 1bb3b778adf6d03c10898f17858c6881afcd3d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20K=C4=99pka?= <46892771+wojciechkepka@users.noreply.github.com> Date: Fri, 18 Jun 2021 15:41:49 +0200 Subject: [PATCH] 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(-) diff --git a/helix-term/src/config.rs b/helix-term/src/config.rs index d2bbe84ff..e5e177531 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,