From ab088fcba5cdeeba25b5cd126bde1fa8bee4dead Mon Sep 17 00:00:00 2001 From: Eclypsed Date: Sun, 7 Dec 2025 21:26:11 -0500 Subject: [PATCH] Shell Upgrades - fzf, zoxide, etc. --- modules/home/zsh.nix | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix index 456f6bf..f58ac99 100644 --- a/modules/home/zsh.nix +++ b/modules/home/zsh.nix @@ -11,6 +11,10 @@ fastfetch = { enable = true; }; + fzf = { + enable = true; + enableZshIntegration = true; + }; starship = { enable = true; enableZshIntegration = true; @@ -95,10 +99,48 @@ scan_timeout = 100; }; }; + zoxide = { + enable = true; + enableZshIntegration = true; + }; zsh = { enable = true; - enableCompletion = true; + enableCompletion = false; + antidote = { + enable = true; + plugins = [ + "Aloxaf/fzf-tab" + ]; + }; autosuggestion.enable = true; + history = { + append = true; + findNoDups = true; + ignoreSpace = true; + ignoreDups = true; + saveNoDups = true; + share = true; + }; + historySubstringSearch = { + enable = true; + searchDownKey = "^p"; + searchUpKey = "^n"; + }; + initContent = '' + # disable sort when completing `git checkout` + zstyle ':completion:*:git-checkout:*' sort false + # set descriptions format to enable group support + # NOTE: don't use escape sequences (like '%F{red}%d%f') here, fzf-tab will ignore them + zstyle ':completion:*:descriptions' format '[%d]' + # preview directory's content when completing cd or zoxide + zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath' + zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath' + # custom fzf flags + # NOTE: fzf-tab does not follow FZF_DEFAULT_OPTS by default + zstyle ':fzf-tab:*' fzf-flags --color=fg:1,fg+:2 --bind=tab:accept + # switch group using `<` and `>` + zstyle ':fzf-tab:*' switch-group '<' '>' + ''; syntaxHighlighting.enable = true; shellAliases = { stu = "ssh stu";