From c48ff32c70eb0ae07b3d7b5c83112427073eb350 Mon Sep 17 00:00:00 2001 From: rsteube Date: Fri, 29 Dec 2023 20:41:10 +0100 Subject: [PATCH] suggestion: added style --- src/completion/base.rs | 4 ++++ src/completion/default.rs | 22 +++++++++++++--------- src/completion/history.rs | 1 + src/menu/columnar_menu.rs | 24 +++++++++++++++++------- src/menu/menu_functions.rs | 2 ++ 5 files changed, 37 insertions(+), 16 deletions(-) diff --git a/src/completion/base.rs b/src/completion/base.rs index 3de63c8d..ed4be1c6 100644 --- a/src/completion/base.rs +++ b/src/completion/base.rs @@ -1,3 +1,5 @@ +use nu_ansi_term::Style; + /// A span of source code, with positions in bytes #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Ord, PartialOrd, Hash)] pub struct Span { @@ -60,6 +62,8 @@ pub struct Suggestion { pub value: String, /// Optional description for the replacement pub description: Option, + /// Optional style for the value + pub style: Option