nu vi mode

This commit is contained in:
2026-03-13 11:54:21 +00:00
parent e5416214ad
commit 627e5cc5cd
3 changed files with 24 additions and 5 deletions

View File

@@ -8,6 +8,7 @@
./plugins/conform.nix ./plugins/conform.nix
./plugins/diffview.nix ./plugins/diffview.nix
./plugins/grug-far.nix ./plugins/grug-far.nix
./plugins/hardtime.nix
./plugins/harpoon.nix ./plugins/harpoon.nix
./plugins/hunk.nix ./plugins/hunk.nix
./plugins/jj-diffconflicts.nix ./plugins/jj-diffconflicts.nix

View File

@@ -0,0 +1,7 @@
{
programs.nixvim.plugins = {
hardtime = {
enable = true;
};
};
}

View File

@@ -222,8 +222,20 @@
cmd: "open_project" cmd: "open_project"
} }
} }
]) ])
'';
# Vi mode prompt indicators (Starship can't detect vi mode in nushell,
# so we handle the character here instead of in the character module)
$env.PROMPT_INDICATOR = {|| $"(ansi green_bold)󰘧(ansi reset) " }
$env.PROMPT_INDICATOR_VI_INSERT = {||
if $env.LAST_EXIT_CODE == 0 {
$"(ansi green_bold)󰘧(ansi reset) "
} else {
$"(ansi red_bold)󰘧(ansi reset) "
}
}
$env.PROMPT_INDICATOR_VI_NORMAL = {|| $"(ansi {attr: b, fg: '#286983'})󰘧(ansi reset) " }
'';
}; };
programs.zsh = { programs.zsh = {
@@ -234,13 +246,12 @@
enable = true; enable = true;
enableNushellIntegration = true; enableNushellIntegration = true;
settings = { settings = {
format = "$directory\${custom.scm}$hostname$line_break$character"; format = "$directory\${custom.scm}$hostname$line_break";
buf = { buf = {
disabled = true; disabled = true;
}; };
character = { character = {
error_symbol = "[󰘧](bold red)"; disabled = true;
success_symbol = "[󰘧](bold green)";
}; };
directory = { directory = {
truncate_to_repo = false; truncate_to_repo = false;