feat(fzf): Install fzf

This commit is contained in:
punkfairie 2024-11-03 14:49:09 -08:00
parent 9cdaccc3c6
commit 2585df4e81
Signed by: punkfairie
GPG key ID: 01823C057725C266
2 changed files with 38 additions and 0 deletions

View file

@ -8,6 +8,7 @@
./curl.nix
./eza.nix
./fish.nix
./fzf.nix
./gh.nix
./hyfetch.nix
./lazygit.nix

37
home/programs/fzf.nix Normal file
View file

@ -0,0 +1,37 @@
{ lib, config, ... }:
{
programs.fzf = {
enable = true;
rose-pine.enable = true;
defaultOptions = [
"--margin=10%,5%"
"--border=sharp"
"--pointer= "
"--marker= "
"--prompt= "
"--preview-label-pos='bottom'"
"--preview-window='border-sharp'"
];
# TODO: Check that rg is installed.
defaultCommand = "rg --files --hidden --glob \"!.git\"";
# TODO: Check that fd is installed.
changeDirWidgetCommand = "fd --type d";
changeDirWidgetOptions = lib.mkIf config.programs.eza.enable [
"--preview 'eza --all --color=always --sort=name --group-directories-first --level=3 {}'"
];
# TODO: Check that fd is installed.
fileWidgetCommand = "fd --type f";
fileWidgetOptions = lib.mkIf config.programs.bat.enable [
"--preview 'bat {}'"
];
tmux.enableShellIntegration = lib.mkIf config.programs.tmux.enable true;
};
home.sessionVariables.fzf_diff_highlighter = "delta --paging=never --features=arctic-fox";
}