From 435823aa1bcc8eb728b2a08ab2595613da22bc34 Mon Sep 17 00:00:00 2001 From: 0xrsydn Date: Sun, 20 Sep 2026 21:26:48 +0700 Subject: [PATCH] feat(zsh): enable fuzzy completion and autosuggestions --- modules/home/shell/zsh.nix | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/modules/home/shell/zsh.nix b/modules/home/shell/zsh.nix index be92e26..137c04c 100644 --- a/modules/home/shell/zsh.nix +++ b/modules/home/shell/zsh.nix @@ -1,8 +1,22 @@ -{ config, ... }: +{ config, pkgs, ... }: { + programs.fzf = { + enable = true; + enableZshIntegration = true; + enableBashIntegration = false; + enableFishIntegration = false; + defaultOptions = [ + "--height=40%" + "--layout=reverse" + "--border" + ]; + }; + programs.zsh = { enable = true; enableCompletion = true; + defaultKeymap = "emacs"; + syntaxHighlighting.enable = true; dotDir = config.home.homeDirectory; oh-my-zsh = { @@ -26,6 +40,13 @@ ''; initContent = '' + # Home Manager loads fzf first. Load fzf-tab before plugins that wrap + # completion widgets, and leave syntax highlighting last. + zstyle ':completion:*' menu no + zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' + source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh + source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh + typeset -U path PATH path=( "$HOME/.cache/.bun/bin"