about summary refs log tree commit diff stats
path: root/nix-conf/home
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2023-01-12 16:25:52 +0000
committerDavid Morgan <djm_uk@protonmail.com>2023-01-12 16:25:52 +0000
commita80fb848199ca82a261e05f190bb4ff53e3a9d22 (patch)
treea4602ae949e7ead9ad6241cbf460f899dd061d34 /nix-conf/home
parent6942ab1663462d5be62ca9a7014966352f114982 (diff)
downloaddotfiles-a80fb848199ca82a261e05f190bb4ff53e3a9d22.tar.gz
Improve zsh variable config
Diffstat (limited to 'nix-conf/home')
-rw-r--r--nix-conf/home/includes/zsh.nix11
1 files 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"
='#n32'>32 33 34 35
36
37