Add atuin to nushell

This commit is contained in:
muon 2026-03-08 15:31:23 +00:00
parent 5e84e6aba8
commit 5518f1ca35
2 changed files with 37 additions and 28 deletions

View file

@ -23,35 +23,43 @@ in {
shellAliases = aliases;
# vi mode + sensible defaults
extraConfig = ''
$env.config = {
show_banner: false
edit_mode: vi
# vi mode + sensible defaults via flat assignments (avoids clobbering other modules)
settings = {
show_banner = false;
edit_mode = "vi";
cursor_shape = {
vi_insert = "line";
vi_normal = "block";
};
history = {
max_size = 2097152;
sync_on_enter = true;
file_format = "sqlite";
isolation = false;
};
completions = {
case_sensitive = false;
quick = true;
partial = true;
algorithm = "fuzzy";
};
table.mode = "rounded";
};
cursor_shape: {
vi_insert: line
vi_normal: block
}
history: {
max_size: 2097152
sync_on_enter: true
file_format: "sqlite"
isolation: false
}
completions: {
case_sensitive: false
quick: true
partial: true
algorithm: "fuzzy"
}
table: {
mode: rounded
}
}
# Append the / keybinding after all integrations (including atuin) are sourced,
# so _atuin_search_cmd is defined when this runs.
extraConfig = lib.mkAfter ''
$env.config = (
$env.config | upsert keybindings (
$env.config.keybindings | append {
name: atuin_search_vi_normal
modifier: none
keycode: char_/
mode: vi_normal
event: { send: executehostcommand cmd: (_atuin_search_cmd) }
}
)
)
'';
# Carry over zsh session variables

View file

@ -42,6 +42,7 @@ in
atuin = {
enable = true;
enableZshIntegration = true;
enableNushellIntegration = true;
flags = ["--disable-up-arrow"];
settings = {
sync_frequency = "5m";