diff --git a/profiles/kat/home/zsh/default.nix b/profiles/kat/home/zsh/default.nix index df1e7f17..41e8f813 100644 --- a/profiles/kat/home/zsh/default.nix +++ b/profiles/kat/home/zsh/default.nix @@ -2,8 +2,15 @@ { config = lib.mkIf config.deploy.profile.kat { + xdg.dataFile = { + "z/.keep".text = ""; + }; + home.packages = with pkgs; [ + fzf fd + ]; programs.zsh = { enable = true; + enableAutosuggestions = true; shellAliases = { nixdirfmt = "fd --color=never .nix | xargs nixfmt"; exa = "exa --time-style long-iso"; @@ -12,18 +19,36 @@ ll = "exa -l"; lla = "exa -lga"; }; - initExtra = '' - ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=3,bold" - ''; - plugins = [{ - name = "zsh-autosuggestions"; - src = pkgs.fetchFromGitHub { - owner = "zsh-users"; - repo = "zsh-autosuggestions"; - rev = "v0.6.4"; - sha256 = "0h52p2waggzfshvy1wvhj4hf06fmzd44bv6j18k3l9rcx6aixzn6"; - }; - }]; + localVariables = { + _Z_DATA = "${config.xdg.dataHome}/z/data"; + ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=3,bold"; + ZSH_AUTOSUGGEST_USE_ASYNC = 1; + }; + plugins = [ + (with pkgs.zsh-syntax-highlighting; { + name = "zsh-syntax-highlighting"; + inherit src; + }) + { + name = "z"; + file = "z.sh"; + src = pkgs.fetchFromGitHub { + owner = "rupa"; + repo = "z"; + rev = "9d5a3fe0407101e2443499e4b95bca33f7a9a9ca"; + sha256 = "0aghw6zmd3851xpzgy0jkh25wzs9a255gxlbdr3zw81948qd9wb1"; + }; + } + { + name = "fzf-z"; + src = pkgs.fetchFromGitHub { + owner = "andrewferrier"; + repo = "fzf-z"; + rev = "089ba6cacd3876c349cfb6b65dc2c3e68b478fd0"; + sha256 = "1lvvkz0v4xibq6z3y8lgfkl9ibcx0spr4qzni0n925ar38s20q81"; + }; + } + ]; oh-my-zsh = { enable = true; plugins = [ "git" "sudo" "adb" "cargo" "emoji" ];