From 54430b7c6f57c7caa0c5a21d422f20ca22008a12 Mon Sep 17 00:00:00 2001 From: ItsEthra <107059409+ItsEthra@users.noreply.github.com> Date: Tue, 19 Sep 2023 23:16:21 +0300 Subject: [PATCH] Added config options for hiding command popup --- helix-view/src/editor.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 2e04037a8..9d3e5dbc3 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -336,6 +336,22 @@ pub struct Config { deserialize_with = "deserialize_alphabet" )] pub jump_label_alphabet: Vec, + /// When to show command hint popup. Defaults to `always` + pub command_hints: CommandHints, + /// Whether to show command description or not. Defaults to `true` + pub command_docs: bool, +} + +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Deserialize, Serialize)] +#[serde(rename_all = "kebab-case")] +pub enum CommandHints { + /// Always show command hint popup + #[default] + Always, + /// Never show it + Never, + /// Show only for command's arguments + OnlyArguments, } #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, Eq, PartialOrd, Ord)] @@ -913,6 +929,8 @@ impl Default for Config { popup_border: PopupBorderConfig::None, indent_heuristic: IndentationHeuristic::default(), jump_label_alphabet: ('a'..='z').collect(), + command_hints: CommandHints::default(), + command_docs: true, } } }