From b985074ee36fb2924b230b3b188b0de693c9c4fb Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sat, 21 Sep 2024 14:10:24 +0300 Subject: [PATCH] Move fzf and eza settings to home-manager configuration --- users/functionalhacker/home.nix | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/users/functionalhacker/home.nix b/users/functionalhacker/home.nix index e17d93f7..a6fa67e1 100644 --- a/users/functionalhacker/home.nix +++ b/users/functionalhacker/home.nix @@ -8,16 +8,13 @@ stateVersion = "24.05"; packages = with pkgs; [ - bat cargo - eza fd gcc grc neovide nerdfonts nodejs - ripgrep trash-cli tree-sitter usbutils @@ -47,6 +44,7 @@ enable = true; syntaxHighlighting.enable = true; enableCompletion = false; + defaultKeymap = "vicmd"; zplug = { enable = true; plugins = [ @@ -70,14 +68,6 @@ export PURE_PROMPT_VICMD_SYMBOL="y" # fzf settings - export FD_COMMAND='fd -HLt' - export FZF_DEFAULT_COMMAND="$FD_COMMAND f" - export FZF_ALT_C_COMMAND="$FD_COMMAND d" - export FZF_ALT_C_OPTS="--preview 'eza -l {}'" - export FZF_DEFAULT_OPTS='-m --ansi --bind ctrl-a:toggle-all,ctrl-d:deselect-all,ctrl-t:toggle-all' - export FZF_COMPLETION_TRIGGER='**' - export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND --strip-cwd-prefix" - export FZF_CTRL_T_OPTS='--preview "bat --color=always --style=numbers --line-range=:500 {}"' _fzf_compgen_path() { resultcmd="$FZF_DEFAULT_COMMAND . $1" eval "''${resultcmd} @@ -165,6 +155,12 @@ fzf = { enable = true; enableZshIntegration = true; + defaultCommand = "fd -Hlt f"; + defaultOptions = "-m --ansi --bind ctrl-a:toggle-all,ctrl-d:deselect-all,ctrl-t:toggle-all"; + fileWidgetCommand = "fd -Hlt f --strip-cwd-prefix"; + fileWidgetOptions = [ "--preview 'bat --color=always --style=numbers --line-range=:500 {}" ]; + changeDirWidgetCommand = "fd -Hlt d"; + changeDirWidgetOptions = "--preview 'eza -l {}'"; }; git = { @@ -278,5 +274,15 @@ enable = true; browsers = [ "firefox" ]; }; + + + eza = { + enable = true; + enableZshIntegration = true; + extraOptions = [ "--git" "--icons" ]; + }; + + ripgrep.enable = true; + bat.enable = true; }; }