diff --git a/home/files/zshrc b/home/files/zshrc index b02d401..b54369a 100644 --- a/home/files/zshrc +++ b/home/files/zshrc @@ -70,3 +70,14 @@ zstyle ':completion::complete:git-checkout:argument-rest:' group-order heads-loc zstyle ':completion::complete:git-checkout:argument-rest:commits' command 'echo' zstyle ':completion::complete:git-checkout:argument-rest:valid-ref-names' command 'echo' zstyle ':completion::complete:git-checkout:argument-rest:remote-branch-refs-noprefix' command 'echo' + + +# Configuration for fzf-tab, see: https://github.com/Aloxaf/fzf-tab#configure +# disable sort when completing `git checkout` +zstyle ':completion:*:git-checkout:*' sort false +# set descriptions format to enable group support +zstyle ':completion:*:descriptions' format '[%d]' +# set list-colors to enable filename colorizing +zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} +# switch group using `,` and `.` +zstyle ':fzf-tab:*' switch-group ',' '.' diff --git a/home/programs/zsh.nix b/home/programs/zsh.nix index 4c673f2..c13fee5 100644 --- a/home/programs/zsh.nix +++ b/home/programs/zsh.nix @@ -32,5 +32,8 @@ initExtra = builtins.readFile(../files/zshrc) + '' zstyle ':completion:*' cache-path ${config.xdg.cacheHome}/zsh-completion/ + + # Load fzf tab plugin + source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.zsh ''; }