From b9622084c90d8a629ccdd56da8cdf37a5f0d340a Mon Sep 17 00:00:00 2001 From: amtoine Date: Thu, 13 Jul 2023 19:42:49 +0200 Subject: [PATCH] set dynamic parts of `$env.config.explore` with the theme --- crates/nu-utils/src/sample_config/default_config.nu | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/nu-utils/src/sample_config/default_config.nu b/crates/nu-utils/src/sample_config/default_config.nu index 2b816f43bb..6a53b6e5b8 100644 --- a/crates/nu-utils/src/sample_config/default_config.nu +++ b/crates/nu-utils/src/sample_config/default_config.nu @@ -176,6 +176,8 @@ let light_theme = { shape_vardecl: purple } +$env.config.color_config = $dark_theme # if you want a light theme, replace `$dark_theme` to `$light_theme` + # External completer example # let carapace_completer = {|spans| # carapace $spans.0 nushell $spans | from json @@ -220,7 +222,7 @@ $env.config = { explore: { try: { - border_color: {fg: "white"} # $env.config.color_config.separator + border_color: ($env.config?.color_config?.separator? | default "gray") }, status_bar_background: {fg: "#1D1F21", bg: "#C4C9C6"}, command_bar_text: {fg: "#C4C9C6"}, @@ -242,7 +244,7 @@ $env.config = { line_index: true, }, config: { - border_color: {fg: "white"} # $env.config.color_config.separator + border_color: ($env.config?.color_config?.separator? | default "gray") cursor_color: {fg: "black", bg: "light_yellow"} }, } @@ -277,7 +279,6 @@ $env.config = { vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line (underscore is the default) } - color_config: $dark_theme # if you want a light theme, replace `$dark_theme` to `$light_theme` use_grid_icons: true footer_mode: "25" # always, never, number_of_rows, auto float_precision: 2 # the precision for displaying floats in tables