From a6a7b7408f3cd80adb1e07fd9aa2ff1f38c7052f Mon Sep 17 00:00:00 2001 From: rsteube Date: Fri, 29 Dec 2023 20:41:10 +0100 Subject: [PATCH 1/3] suggestion: added style supports reverse highlighting using nu.config ```nushell style: { text: white selected_text: { attr: r } description_text: white_dimmed } ``` --- src/completion/base.rs | 3 +++ src/completion/default.rs | 22 +++++++++++++--------- src/completion/history.rs | 1 + src/menu/columnar_menu.rs | 21 +++++++++++++++++---- src/menu/menu_functions.rs | 2 ++ 5 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/completion/base.rs b/src/completion/base.rs index 53c467eb..909c467b 100644 --- a/src/completion/base.rs +++ b/src/completion/base.rs @@ -1,3 +1,4 @@ +use nu_ansi_term::Style; use std::ops::Range; /// A span of source code, with positions in bytes @@ -79,6 +80,8 @@ pub struct Suggestion { pub value: String, /// Optional description for the replacement pub description: Option, + /// Optional style for the replacement + pub style: Option