Compare commits

...

3 Commits

Author SHA1 Message Date
David Morgan a80fb84819
Improve zsh variable config 2023-01-12 16:25:52 +00:00
David Morgan 6942ab1663
Add zsh-nvm and per-directory-history 2023-01-12 16:11:22 +00:00
David Morgan e859cdc400
Add pms 2023-01-12 16:10:06 +00:00
2 changed files with 33 additions and 5 deletions

View File

@ -35,6 +35,7 @@
pinentry_mac
pgcli
pgformatter
pms
postgresql
#python310Packages.sqlparse
sqls

View File

@ -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
@ -87,6 +83,16 @@
gloga = "git log --oneline --decorate --graph --all";
};
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
'';
@ -106,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"
@ -253,6 +260,26 @@
};
file = "fzf-git.sh";
}
{
name = "per-directory-history";
src = fetchFromGitHub {
owner = "jimhester";
repo = "per-directory-history";
rev = "0687bbfd736da566472a6d67c2b45c501b73d405";
sha256 = "7Z0qaDhgopKt9BDKSqdziw9jsVgiLLafs30wPPbz+oo=";
};
file = "per-directory-history.zsh";
}
{
name = "zsh-nvm";
src = fetchFromGitHub {
owner = "lukechilds";
repo = "zsh-nvm";
rev = "23067bd9bb6eb6f4737a3ea90cb0cb5e85f61ba2";
sha256 = "Zwdi7bezMFKaIKYwsSftu3mJSFvadEWmY2hYnU1Kpu4=";
};
file = "zsh-nvm.plugin.zsh";
}
];
};
}