From a7c5193cf764de1cc59f7d09b4f691da0031f6a5 Mon Sep 17 00:00:00 2001 From: Szymon P Date: Sun, 1 Mar 2026 23:20:25 +0100 Subject: [PATCH] function and nixvim --- modules/cli/fish.nix | 82 +++++++++++++++++++++++++++--------------- modules/cli/nixvim.nix | 17 +++++++-- 2 files changed, 69 insertions(+), 30 deletions(-) diff --git a/modules/cli/fish.nix b/modules/cli/fish.nix index 5fe6e9b..7d4d8dc 100644 --- a/modules/cli/fish.nix +++ b/modules/cli/fish.nix @@ -85,38 +85,64 @@ }; update = { - body = # fish - '' - echo "===System update===" + body = + if isNixOS then + # fish + '' + echo "=== System packages update===" + pushd /etc/nixos + nix flake update + reload_system + popd - if not type -q yay - echo "Yay not found… Is this Arch? If yes, then please consider installing it!" - else - yay - end + echo "===User packages update===" + pushd $HOME/.config/home-manager + nix flake update + reload_dotfiles + popd - if type -q pacman - echo "===Remove orphans===" - set orphans (pacman -Qtdq) - if test (count $orphans) -gt 0 - sudo pacman -Rns $orphans - end - end - if type -q flatpak - echo "===Flatpak update===" - flatpak update --noninteractive - echo "===Flatpak remove unused===" - flatpak uninstall --unused - end + echo "=== Flatpak update===" + if type -q flatpak + echo "===Flatpak update===" + flatpak update --noninteractive + echo "===Flatpak remove unused===" + flatpak uninstall --unused + end + '' + else + # fish + '' + echo "===System update===" - if type -q nix-channel - echo "===Nix update===" - nix-channel --update - echo "===Nix garbage collection===" - home-manager expire-generations "-7 days" - end - ''; + if not type -q yay + echo "Yay not found… Please consider installing it!" + else + yay + end + + if type -q pacman + echo "===Remove orphans===" + set orphans (pacman -Qtdq) + if test (count $orphans) -gt 0 + sudo pacman -Rns $orphans + end + end + + if type -q flatpak + echo "===Flatpak update===" + flatpak update --noninteractive + echo "===Flatpak remove unused===" + flatpak uninstall --unused + end + + if type -q nix-channel + echo "===Nix update===" + nix-channel --update + echo "===Nix garbage collection===" + home-manager expire-generations "-7 days" + end + ''; }; rm = { diff --git a/modules/cli/nixvim.nix b/modules/cli/nixvim.nix index 3b6c61f..3fccecc 100644 --- a/modules/cli/nixvim.nix +++ b/modules/cli/nixvim.nix @@ -100,6 +100,14 @@ action.__raw = "function() require('harpoon'):list():next() end"; options.desc = "Toggle next harpoon buffer"; } + { + key = "j"; + action= "jzz"; + } + { + key = "k"; + action= "kzz"; + } ]; autoGroups = { @@ -203,9 +211,14 @@ }; }; - indent-blankline = { + cursorline = { enable = true; - settings.scope.enabled = true; + timeout = 0; + }; + + mini-indentscope = { + enable = true; + settings.draw.delay = 0; }; cmp = {