From 915bde542c21cf6026cc8b811ecb28d1da561b69 Mon Sep 17 00:00:00 2001 From: Joshua Yuen Date: Fri, 22 Aug 2025 11:25:22 -0400 Subject: [PATCH] Add fzf --- modules/core/user.nix | 3 +++ modules/home/zsh/default.nix | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/core/user.nix b/modules/core/user.nix index 77a0e3a..2ea26d5 100644 --- a/modules/core/user.nix +++ b/modules/core/user.nix @@ -44,6 +44,9 @@ in ]; shell = pkgs.${shellCfg.defaultShell}; ignoreShellProgramCheck = true; + packages = with pkgs; [ + fzf + ]; }; # Set /etc/shells so GDM will show our user when ZSH is selected diff --git a/modules/home/zsh/default.nix b/modules/home/zsh/default.nix index 0cf4c7e..fafbd13 100644 --- a/modules/home/zsh/default.nix +++ b/modules/home/zsh/default.nix @@ -16,7 +16,8 @@ in programs.zsh = { enable = cfg.enable; dotDir = "${xdgCfg.configHome}/zsh"; - autosuggestion.enable = true; + autosuggestion.enable = false; + enableCompletion = true; syntaxHighlighting = { enable = true; highlighters = [ @@ -28,9 +29,13 @@ in }; historySubstringSearch.enable = true; history = { + append = true; ignoreDups = false; + ignoreSpace = true; save = 100000; + share = true; size = 100000; + extended = true; }; initContent = '' @@ -45,6 +50,12 @@ in # Tab to accept current selection bind-key -M menuselect '^I' accept-and-infer-next-history + + # Load fzf keybindings + if [ -n "''${commands[fzf-share]}" ]; then + source "$(fzf-share)/key-bindings.zsh"; + source "$(fzf-share)/completion.zsh"; + fi ''; shellAliases = {