diff options
author | David Morgan <djm_uk@protonmail.com> | 2024-09-03 15:45:26 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2024-09-03 15:45:26 +0100 |
commit | 72cbea45f37a62002c0f7b14b2c3334133eda2ac (patch) | |
tree | e74033c7116f84a76a01a7cec9af12b588001e55 /nix-conf/home/includes/zsh.nix | |
parent | 6fa3a5537e9cd9784e8cf75a9475896e59b19579 (diff) | |
download | dotfiles-72cbea45f37a62002c0f7b14b2c3334133eda2ac.tar.gz |
Move fzf variables to programs.zsh.localVariables
Diffstat (limited to 'nix-conf/home/includes/zsh.nix')
-rw-r--r-- | nix-conf/home/includes/zsh.nix | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/nix-conf/home/includes/zsh.nix b/nix-conf/home/includes/zsh.nix index c1fb138..6afcbf2 100644 --- a/nix-conf/home/includes/zsh.nix +++ b/nix-conf/home/includes/zsh.nix @@ -108,6 +108,13 @@ in LSP_USE_PLISTS = true; LESS = "-iRXF"; + + FZF_DEFAULT_COMMAND=''rg --files --no-ignore --hidden --follow -g \"!{.git,node_modules}/*\" 2> /dev/null''; + FZF_CTRL_T_COMMAND="${config.programs.zsh.localVariables.FZF_DEFAULT_COMMAND}"; + FZF_ALT_C_COMMAND=''rg --hidden --files --sort-files --null -g \"!{.git,node_modules}/*\" | xargs -0 dirname | sort -u''; + FZF_ALT_C_OPTS="--preview 'eza --tree {} | head -200'"; + FZF_CTRL_R_OPTS="--preview 'echo {}' --preview-window down:3:hidden:wrap --bind 'ctrl-t:toggle-preview'"; + FZF_DEFAULT_OPTS="--bind=ctrl-t:toggle-all --bind=ctrl-j:jump"; }; initExtraFirst = '' [[ $TERM == "tramp" ]] && unsetopt zle && PS1='$ ' && return @@ -128,14 +135,6 @@ in fi fi - # Keep these in initExtra, rather than localVariables, because the order matters - export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow -g "!{.git,node_modules}/*" 2> /dev/null' - export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" - export FZF_ALT_C_COMMAND='rg --hidden --files --sort-files --null -g "!{.git,node_modules}/*" | xargs -0 dirname | sort -u' - export FZF_ALT_C_OPTS="--preview 'eza --tree {} | head -200'" - export FZF_CTRL_R_OPTS="--preview 'echo {}' --preview-window down:3:hidden:wrap --bind 'ctrl-t:toggle-preview'" - export FZF_DEFAULT_OPTS="--bind=ctrl-t:toggle-all --bind=ctrl-j:jump" - eval "$(batpipe)" autopair-init enable-fzf-tab |