From 7b3a3d562cb46a1d70950983d460e388ae46cf79 Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Mon, 28 Mar 2022 06:41:52 +0530 Subject: Move top level lsp config to editor.lsp (#1868) * Move top level lsp config to editor.lsp This is mainly done to accomodate the new lsp.signature-help config option that will be introduced in https://github.com/helix-editor/helix/pull/1755 which will have to be accessed by commands. The top level config struct is split and moved to different places, making the relocation necessary * Revert rebase slipup--- helix-term/src/application.rs | 2 +- helix-term/src/config.rs | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'helix-term') diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 9b21c2a0..6f90ae61 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -760,7 +760,7 @@ impl Application { self.lsp_progress.update(server_id, token, work); } - if self.config.load().lsp.display_messages { + if self.config.load().editor.lsp.display_messages { self.editor.set_status(status); } } diff --git a/helix-term/src/config.rs b/helix-term/src/config.rs index 06e44ad9..4407a882 100644 --- a/helix-term/src/config.rs +++ b/helix-term/src/config.rs @@ -11,8 +11,6 @@ use toml::de::Error as TomlError; #[serde(deny_unknown_fields)] pub struct Config { pub theme: Option, - #[serde(default)] - pub lsp: LspConfig, #[serde(default = "default")] pub keys: HashMap, #[serde(default)] @@ -23,7 +21,6 @@ impl Default for Config { fn default() -> Config { Config { theme: None, - lsp: LspConfig::default(), keys: default(), editor: helix_view::editor::Config::default(), } @@ -45,12 +42,6 @@ impl Display for ConfigLoadError { } } -#[derive(Debug, Default, Clone, PartialEq, Deserialize)] -#[serde(rename_all = "kebab-case", deny_unknown_fields)] -pub struct LspConfig { - pub display_messages: bool, -} - impl Config { pub fn load(config_path: PathBuf) -> Result { match std::fs::read_to_string(config_path) { -- cgit v1.2.3-70-g09d2