From a80fb848199ca82a261e05f190bb4ff53e3a9d22 Mon Sep 17 00:00:00 2001 From: David Morgan Date: Thu, 12 Jan 2023 16:25:52 +0000 Subject: [PATCH] Improve zsh variable config --- nix-conf/home/includes/zsh.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nix-conf/home/includes/zsh.nix b/nix-conf/home/includes/zsh.nix index e0190c7..21ff059 100644 --- a/nix-conf/home/includes/zsh.nix +++ b/nix-conf/home/includes/zsh.nix @@ -35,10 +35,6 @@ expireDuplicatesFirst = true; }; - envExtra = '' - export LSP_USE_PLISTS=true - export LESS=-iRXF - ''; profileExtra = '' [[ -f ~/.nix-profile/etc/profile.d/nix.sh ]] && . ~/.nix-profile/etc/profile.d/nix.sh path=(~/bin @@ -90,8 +86,12 @@ localVariables = { PER_DIRECTORY_HISTORY_TOGGLE = "^\\\\"; # ^\\ is ^# HISTORY_START_WITH_GLOBAL=true; + NVM_AUTO_USE = true; NVM_LAZY_LOAD = true; + + LSP_USE_PLISTS = true; + LESS = "-iRXF"; }; initExtraFirst = '' [[ $TERM == "tramp" ]] && unsetopt zle && PS1='$ ' && return @@ -112,9 +112,10 @@ 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_COMMAND='rg --hidden --files --sort-files --null -g "!{.git,node_modules}/*" | xargs -0 dirname | sort -u' export FZF_ALT_C_OPTS="--preview 'exa --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"