Skip to content

Commit

Permalink
feat: Nushell Extra Theme Config (#298)
Browse files Browse the repository at this point in the history
This commit adds extra files to generate a theming file for Nushell (see
https://www.nushell.sh/book/coloring_and_theming.html#theming). The file
can be source as in following example:

```nushell
source /path/to/nightfox.nvim/extra/nightfox/nightfox_nushell.nu

let-env config = ($env.config | upsert color_config $nightfox_theme)
```
  • Loading branch information
schrieveslaach committed Jan 18, 2023
1 parent 925cca4 commit 23a678f
Show file tree
Hide file tree
Showing 9 changed files with 360 additions and 0 deletions.
43 changes: 43 additions & 0 deletions extra/carbonfox/nightfox_nushell.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
let carbonfox_theme = {
binary: "#3ddbd9"
block: "#b6b8bb"
bool: "#5ae0df"
cellpath: "#dfdfe0"
date: "#25be6a"
duration: "#25be6a"
filesize: "#3ddbd9"
float: "#3ddbd9"
int: "#3ddbd9"
list: "#b6b8bb"
nothing: "#dfdfe0"
range: "#dfdfe0"
record: "#dfdfe0"
string: "#25be6a"

leading_trailing_space_bg: "#353535"
header: "#b6b8bb"
empty: "#78a9ff"
row_index: "#7b7c7e"
hints: "#7b7c7e"
separator: "#6e6f70"

shape_block: "#b6b8bb"
shape_bool: "#5ae0df"
shape_external: "#be95ff"
shape_externalarg: "#dfdfe0"
shape_filepath: "#dfdfe0"
shape_flag: "#33b1ff"
shape_float: "#3ddbd9"
shape_globpattern: "#2dc7c4"
shape_int: "#3ddbd9"
shape_internalcall: "#be95ff"
shape_list: "#b6b8bb"
shape_literal: "#25be6a"
shape_nothing: "#52bdff"
shape_operator: "#b6b8bb"
shape_record: "#b6b8bb"
shape_string: "#25be6a"
shape_string_interpolation: "#2dc7c4"
shape_table: "#b6b8bb"
shape_variable: "#dfdfe0"
}
43 changes: 43 additions & 0 deletions extra/dawnfox/nightfox_nushell.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
let dawnfox_theme = {
binary: "#d7827e"
block: "#625c87"
bool: "#ca6e69"
cellpath: "#575279"
date: "#618774"
duration: "#618774"
filesize: "#d7827e"
float: "#d7827e"
int: "#d7827e"
list: "#625c87"
nothing: "#575279"
range: "#575279"
record: "#575279"
string: "#618774"

leading_trailing_space_bg: "#ebdfe4"
header: "#625c87"
empty: "#286983"
row_index: "#a8a3b3"
hints: "#a8a3b3"
separator: "#9893a5"

shape_block: "#625c87"
shape_bool: "#ca6e69"
shape_external: "#907aa9"
shape_externalarg: "#575279"
shape_filepath: "#575279"
shape_flag: "#56949f"
shape_float: "#d7827e"
shape_globpattern: "#dd9024"
shape_int: "#d7827e"
shape_internalcall: "#907aa9"
shape_list: "#625c87"
shape_literal: "#618774"
shape_nothing: "#50848c"
shape_operator: "#625c87"
shape_record: "#625c87"
shape_string: "#618774"
shape_string_interpolation: "#dd9024"
shape_table: "#625c87"
shape_variable: "#575279"
}
43 changes: 43 additions & 0 deletions extra/dayfox/nightfox_nushell.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
let dayfox_theme = {
binary: "#955f61"
block: "#643f61"
bool: "#7f5152"
cellpath: "#352c24"
date: "#396847"
duration: "#396847"
filesize: "#955f61"
float: "#955f61"
int: "#955f61"
list: "#643f61"
nothing: "#352c24"
range: "#352c24"
record: "#352c24"
string: "#396847"

leading_trailing_space_bg: "#d3c7bb"
header: "#643f61"
empty: "#2848a9"
row_index: "#824d5b"
hints: "#824d5b"
separator: "#837a72"

shape_block: "#643f61"
shape_bool: "#7f5152"
shape_external: "#6e33ce"
shape_externalarg: "#352c24"
shape_filepath: "#352c24"
shape_flag: "#287980"
shape_float: "#955f61"
shape_globpattern: "#924702"
shape_int: "#955f61"
shape_internalcall: "#6e33ce"
shape_list: "#643f61"
shape_literal: "#396847"
shape_nothing: "#22676d"
shape_operator: "#643f61"
shape_record: "#643f61"
shape_string: "#396847"
shape_string_interpolation: "#924702"
shape_table: "#643f61"
shape_variable: "#352c24"
}
43 changes: 43 additions & 0 deletions extra/duskfox/nightfox_nushell.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
let duskfox_theme = {
binary: "#ea9a97"
block: "#cdcbe0"
bool: "#f0a4a2"
cellpath: "#e0def4"
date: "#a3be8c"
duration: "#a3be8c"
filesize: "#ea9a97"
float: "#ea9a97"
int: "#ea9a97"
list: "#cdcbe0"
nothing: "#e0def4"
range: "#e0def4"
record: "#e0def4"
string: "#a3be8c"

leading_trailing_space_bg: "#373354"
header: "#cdcbe0"
empty: "#569fba"
row_index: "#6e6a86"
hints: "#6e6a86"
separator: "#817c9c"

shape_block: "#cdcbe0"
shape_bool: "#f0a4a2"
shape_external: "#c4a7e7"
shape_externalarg: "#e0def4"
shape_filepath: "#e0def4"
shape_flag: "#9ccfd8"
shape_float: "#ea9a97"
shape_globpattern: "#f9cb8c"
shape_int: "#ea9a97"
shape_internalcall: "#c4a7e7"
shape_list: "#cdcbe0"
shape_literal: "#a3be8c"
shape_nothing: "#a6dae3"
shape_operator: "#cdcbe0"
shape_record: "#cdcbe0"
shape_string: "#a3be8c"
shape_string_interpolation: "#f9cb8c"
shape_table: "#cdcbe0"
shape_variable: "#e0def4"
}
43 changes: 43 additions & 0 deletions extra/nightfox/nightfox_nushell.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
let nightfox_theme = {
binary: "#f4a261"
block: "#aeafb0"
bool: "#f6b079"
cellpath: "#dfdfe0"
date: "#81b29a"
duration: "#81b29a"
filesize: "#f4a261"
float: "#f4a261"
int: "#f4a261"
list: "#aeafb0"
nothing: "#dfdfe0"
range: "#dfdfe0"
record: "#dfdfe0"
string: "#81b29a"

leading_trailing_space_bg: "#29394f"
header: "#aeafb0"
empty: "#719cd6"
row_index: "#71839b"
hints: "#71839b"
separator: "#738091"

shape_block: "#aeafb0"
shape_bool: "#f6b079"
shape_external: "#9d79d6"
shape_externalarg: "#dfdfe0"
shape_filepath: "#dfdfe0"
shape_flag: "#63cdcf"
shape_float: "#f4a261"
shape_globpattern: "#e0c989"
shape_int: "#f4a261"
shape_internalcall: "#9d79d6"
shape_list: "#aeafb0"
shape_literal: "#81b29a"
shape_nothing: "#7ad5d6"
shape_operator: "#aeafb0"
shape_record: "#aeafb0"
shape_string: "#81b29a"
shape_string_interpolation: "#e0c989"
shape_table: "#aeafb0"
shape_variable: "#dfdfe0"
}
43 changes: 43 additions & 0 deletions extra/nordfox/nightfox_nushell.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
let nordfox_theme = {
binary: "#c9826b"
block: "#abb1bb"
bool: "#d89079"
cellpath: "#e5e9f0"
date: "#a3be8c"
duration: "#a3be8c"
filesize: "#c9826b"
float: "#c9826b"
int: "#c9826b"
list: "#abb1bb"
nothing: "#e5e9f0"
range: "#e5e9f0"
record: "#e5e9f0"
string: "#a3be8c"

leading_trailing_space_bg: "#444c5e"
header: "#abb1bb"
empty: "#81a1c1"
row_index: "#7e8188"
hints: "#7e8188"
separator: "#60728a"

shape_block: "#abb1bb"
shape_bool: "#d89079"
shape_external: "#b48ead"
shape_externalarg: "#e5e9f0"
shape_filepath: "#e5e9f0"
shape_flag: "#88c0d0"
shape_float: "#c9826b"
shape_globpattern: "#f0d399"
shape_int: "#c9826b"
shape_internalcall: "#b48ead"
shape_list: "#abb1bb"
shape_literal: "#a3be8c"
shape_nothing: "#93ccdc"
shape_operator: "#abb1bb"
shape_record: "#abb1bb"
shape_string: "#a3be8c"
shape_string_interpolation: "#f0d399"
shape_table: "#abb1bb"
shape_variable: "#e5e9f0"
}
43 changes: 43 additions & 0 deletions extra/terafox/nightfox_nushell.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
let terafox_theme = {
binary: "#ff8349"
block: "#cbd9d8"
bool: "#ff9664"
cellpath: "#ebebeb"
date: "#7aa4a1"
duration: "#7aa4a1"
filesize: "#ff8349"
float: "#ff8349"
int: "#ff8349"
list: "#cbd9d8"
nothing: "#ebebeb"
range: "#ebebeb"
record: "#ebebeb"
string: "#7aa4a1"

leading_trailing_space_bg: "#254147"
header: "#cbd9d8"
empty: "#5a93aa"
row_index: "#587b7b"
hints: "#587b7b"
separator: "#6d7f8b"

shape_block: "#cbd9d8"
shape_bool: "#ff9664"
shape_external: "#ad5c7c"
shape_externalarg: "#ebebeb"
shape_filepath: "#ebebeb"
shape_flag: "#a1cdd8"
shape_float: "#ff8349"
shape_globpattern: "#fdb292"
shape_int: "#ff8349"
shape_internalcall: "#ad5c7c"
shape_list: "#cbd9d8"
shape_literal: "#7aa4a1"
shape_nothing: "#afd4de"
shape_operator: "#cbd9d8"
shape_record: "#cbd9d8"
shape_string: "#7aa4a1"
shape_string_interpolation: "#fdb292"
shape_table: "#cbd9d8"
shape_variable: "#ebebeb"
}
58 changes: 58 additions & 0 deletions lua/nightfox/extra/nushell.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
local template = require("nightfox.util.template")

local M = {}

function M.generate(spec)
local P = spec.palette
spec.harsh = P.meta.light and P.black or P.white

local content = [[
let ${palette.meta.name}_theme = {
binary: "${syntax.number}"
block: "${syntax.bracket}"
bool: "${syntax.const}"
cellpath: "${harsh}"
date: "${syntax.string}"
duration: "${syntax.string}"
filesize: "${syntax.number}"
float: "${syntax.number}"
int: "${syntax.number}"
list: "${syntax.bracket}"
nothing: "${harsh}"
range: "${harsh}"
record: "${harsh}"
string: "${syntax.string}"
leading_trailing_space_bg: "${bg3}"
header: "${fg2}"
empty: "${palette.blue}"
row_index: "${fg3}"
hints: "${fg3}"
separator: "${syntax.comment}"
shape_block: "${syntax.bracket}"
shape_bool: "${syntax.const}"
shape_external: "${syntax.statement}"
shape_externalarg: "${syntax.variable}"
shape_filepath: "${syntax.variable}"
shape_flag: "${syntax.ident}"
shape_float: "${syntax.number}"
shape_globpattern: "${syntax.regex}"
shape_int: "${syntax.number}"
shape_internalcall: "${syntax.statement}"
shape_list: "${syntax.bracket}"
shape_literal: "${syntax.string}"
shape_nothing: "${syntax.builtin1}"
shape_operator: "${syntax.operator}"
shape_record: "${syntax.bracket}"
shape_string: "${syntax.string}"
shape_string_interpolation: "${syntax.regex}"
shape_table: "${syntax.bracket}"
shape_variable: "${syntax.variable}"
}
]]

return template.parse_template_str(content, spec)
end

return M
1 change: 1 addition & 0 deletions misc/extra.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ local extras = {
iterm = "itermcolors",
kitty = "conf",
konsole = "colorscheme",
nushell = "nu",
tmux = "tmux",
wezterm = "toml",
windows_terminal = "json",
Expand Down

0 comments on commit 23a678f

Please sign in to comment.