| 1 |
# Alloy Nushell config |
| 2 |
# |
| 3 |
# Loaded on every nu shell start. Configures nu's own behavior — table style, |
| 4 |
# history, completions, keybindings, color palette for nu's own output. |
| 5 |
# |
| 6 |
# Aliases live in aliases.nu (sourced at the bottom). |
| 7 |
# Environment lives in env.nu (loaded before this file by nu itself). |
| 8 |
|
| 9 |
# ------------------------------------------------------------------- |
| 10 |
# Alloy color palette — Akari Dawn (default light). |
| 11 |
# Source of truth: makeover's themes/akari-dawn.toml. |
| 12 |
# ------------------------------------------------------------------- |
| 13 |
let alloy = { |
| 14 |
surface: "#e4ded6" # oklch(96% 0.012 80) |
| 15 |
surface_raised: "#ede7de" # oklch(98% 0.012 80) |
| 16 |
border_subtle: "#dad2c7" # oklch(88% 0.012 80) |
| 17 |
border: "#cabeae" # oklch(80% 0.012 80) |
| 18 |
text_muted: "#514b45" # oklch(55% 0.012 80) |
| 19 |
text_secondary: "#222d38" # oklch(38% 0.012 80) |
| 20 |
text_primary: "#1a1816" # oklch(18% 0.012 80) |
| 21 |
accent_error: "#6a2828" # oklch(55% 0.18 25) |
| 22 |
accent_warn: "#b07840" # oklch(70% 0.15 85) |
| 23 |
accent_ok: "#3a5830" # oklch(58% 0.12 145) (approximate) |
| 24 |
} |
| 25 |
|
| 26 |
# ------------------------------------------------------------------- |
| 27 |
# Main config record |
| 28 |
# ------------------------------------------------------------------- |
| 29 |
$env.config = { |
| 30 |
show_banner: false |
| 31 |
|
| 32 |
ls: { |
| 33 |
use_ls_colors: true |
| 34 |
clickable_links: false |
| 35 |
} |
| 36 |
|
| 37 |
table: { |
| 38 |
mode: light |
| 39 |
index_mode: always |
| 40 |
show_empty: true |
| 41 |
padding: { left: 1, right: 1 } |
| 42 |
trim: { |
| 43 |
methodology: wrapping |
| 44 |
wrapping_try_keep_words: true |
| 45 |
} |
| 46 |
header_on_separator: false |
| 47 |
} |
| 48 |
|
| 49 |
error_style: fancy |
| 50 |
display_errors: { |
| 51 |
exit_code: false |
| 52 |
termination_signal: true |
| 53 |
} |
| 54 |
|
| 55 |
footer_mode: 25 |
| 56 |
float_precision: 2 |
| 57 |
buffer_editor: "hx" |
| 58 |
use_ansi_coloring: true |
| 59 |
edit_mode: vi |
| 60 |
shell_integration: { |
| 61 |
osc2: true |
| 62 |
osc7: true |
| 63 |
osc8: true |
| 64 |
osc9_9: false |
| 65 |
osc133: true |
| 66 |
osc633: true |
| 67 |
reset_application_mode: true |
| 68 |
} |
| 69 |
render_right_prompt_on_last_line: false |
| 70 |
|
| 71 |
rm: { always_trash: false } |
| 72 |
|
| 73 |
history: { |
| 74 |
max_size: 100_000 |
| 75 |
sync_on_enter: true |
| 76 |
file_format: "sqlite" |
| 77 |
isolation: true |
| 78 |
} |
| 79 |
|
| 80 |
completions: { |
| 81 |
case_sensitive: false |
| 82 |
quick: true |
| 83 |
partial: true |
| 84 |
algorithm: "fuzzy" |
| 85 |
external: { |
| 86 |
enable: true |
| 87 |
max_results: 100 |
| 88 |
completer: null |
| 89 |
} |
| 90 |
use_ls_colors: true |
| 91 |
} |
| 92 |
|
| 93 |
filesize: { |
| 94 |
metric: true |
| 95 |
format: "auto" |
| 96 |
} |
| 97 |
|
| 98 |
cursor_shape: { |
| 99 |
emacs: line |
| 100 |
vi_insert: block |
| 101 |
vi_normal: underscore |
| 102 |
} |
| 103 |
|
| 104 |
color_config: { |
| 105 |
separator: $alloy.border |
| 106 |
leading_trailing_space_bg: { attr: n } |
| 107 |
header: { fg: $alloy.text_primary attr: b } |
| 108 |
empty: $alloy.text_muted |
| 109 |
bool: $alloy.text_primary |
| 110 |
int: $alloy.text_primary |
| 111 |
filesize: $alloy.text_secondary |
| 112 |
duration: $alloy.text_secondary |
| 113 |
date: $alloy.text_secondary |
| 114 |
range: $alloy.text_primary |
| 115 |
float: $alloy.text_primary |
| 116 |
string: $alloy.text_primary |
| 117 |
nothing: $alloy.text_muted |
| 118 |
binary: $alloy.text_secondary |
| 119 |
cell-path: $alloy.text_primary |
| 120 |
row_index: { fg: $alloy.text_muted attr: b } |
| 121 |
record: $alloy.text_primary |
| 122 |
list: $alloy.text_primary |
| 123 |
block: $alloy.text_primary |
| 124 |
hints: $alloy.text_muted |
| 125 |
search_result: { fg: $alloy.accent_warn bg: $alloy.surface_raised } |
| 126 |
|
| 127 |
shape_binary: { fg: $alloy.text_secondary attr: b } |
| 128 |
shape_bool: $alloy.text_primary |
| 129 |
shape_int: { fg: $alloy.text_primary attr: b } |
| 130 |
shape_float: { fg: $alloy.text_primary attr: b } |
| 131 |
shape_range: { fg: $alloy.accent_warn attr: b } |
| 132 |
shape_internalcall: { fg: $alloy.text_primary attr: b } |
| 133 |
shape_external: $alloy.text_secondary |
| 134 |
shape_externalarg: { fg: $alloy.text_primary attr: b } |
| 135 |
shape_literal: $alloy.text_secondary |
| 136 |
shape_operator: $alloy.accent_warn |
| 137 |
shape_signature: { fg: $alloy.text_secondary attr: b } |
| 138 |
shape_string: $alloy.accent_ok |
| 139 |
shape_string_interpolation: { fg: $alloy.accent_ok attr: b } |
| 140 |
shape_datetime: { fg: $alloy.text_secondary attr: b } |
| 141 |
shape_list: { fg: $alloy.text_primary attr: b } |
| 142 |
shape_table: { fg: $alloy.text_primary attr: b } |
| 143 |
shape_record: { fg: $alloy.text_primary attr: b } |
| 144 |
shape_block: { fg: $alloy.text_primary attr: b } |
| 145 |
shape_filepath: $alloy.text_secondary |
| 146 |
shape_directory: $alloy.text_primary |
| 147 |
shape_globpattern: { fg: $alloy.text_secondary attr: b } |
| 148 |
shape_variable: $alloy.text_secondary |
| 149 |
shape_flag: { fg: $alloy.text_secondary attr: b } |
| 150 |
shape_pipe: { fg: $alloy.text_muted attr: b } |
| 151 |
shape_and: { fg: $alloy.text_secondary attr: b } |
| 152 |
shape_or: { fg: $alloy.text_secondary attr: b } |
| 153 |
shape_redirection: { fg: $alloy.accent_warn attr: b } |
| 154 |
shape_custom: $alloy.accent_ok |
| 155 |
shape_nothing: $alloy.text_muted |
| 156 |
shape_matching_brackets: { attr: u } |
| 157 |
shape_garbage: { fg: $alloy.accent_error attr: b } |
| 158 |
} |
| 159 |
|
| 160 |
hooks: { |
| 161 |
pre_prompt: [] |
| 162 |
pre_execution: [] |
| 163 |
env_change: { |
| 164 |
PWD: [] |
| 165 |
} |
| 166 |
display_output: null |
| 167 |
command_not_found: null |
| 168 |
} |
| 169 |
|
| 170 |
menus: [] |
| 171 |
keybindings: [] |
| 172 |
} |
| 173 |
|
| 174 |
# ------------------------------------------------------------------- |
| 175 |
# Integrations — conditionally loaded if the tool is present |
| 176 |
# ------------------------------------------------------------------- |
| 177 |
|
| 178 |
# starship prompt |
| 179 |
if (which starship | is-not-empty) { |
| 180 |
let starship_cache = ($nu.cache-dir | path join "starship-init.nu") |
| 181 |
if not ($starship_cache | path exists) { |
| 182 |
mkdir ($starship_cache | path dirname) |
| 183 |
starship init nu | save -f $starship_cache |
| 184 |
} |
| 185 |
source $starship_cache |
| 186 |
} |
| 187 |
|
| 188 |
# zoxide directory jumper |
| 189 |
if (which zoxide | is-not-empty) { |
| 190 |
let zoxide_cache = ($nu.cache-dir | path join "zoxide-init.nu") |
| 191 |
if not ($zoxide_cache | path exists) { |
| 192 |
mkdir ($zoxide_cache | path dirname) |
| 193 |
zoxide init nushell | save -f $zoxide_cache |
| 194 |
} |
| 195 |
source $zoxide_cache |
| 196 |
} |
| 197 |
|
| 198 |
# ------------------------------------------------------------------- |
| 199 |
# Aliases (small, curated — see aliases.nu) |
| 200 |
# ------------------------------------------------------------------- |
| 201 |
source ($nu.default-config-dir | path join "aliases.nu") |
| 202 |
|