46 lines
887 B
Nix
46 lines
887 B
Nix
{
|
|
config
|
|
,pkgs
|
|
}:
|
|
|
|
# Sources:
|
|
# https://thevaluable.dev/zsh-install-configure-mouseless/
|
|
# https://thevaluable.dev/zsh-completion-guide-examples/
|
|
|
|
{
|
|
enable = true;
|
|
|
|
dotDir = ".config/zsh";
|
|
|
|
autocd = false;
|
|
|
|
defaultKeymap = "viins";
|
|
|
|
# Can be re sourced via: __HM_ZSH_SESS_VARS_SOURCED= source ~/.zshenv
|
|
sessionVariables = {
|
|
# Reduce timeout after <ESC> (vi keybindings)
|
|
KEYTIMEOUT = 1;
|
|
};
|
|
|
|
history = {
|
|
size = 100000;
|
|
save = 100000;
|
|
ignoreDups = true;
|
|
ignoreSpace = true;
|
|
extended = true;
|
|
share = false;
|
|
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
|
};
|
|
|
|
syntaxHighlighting = {
|
|
enable = true;
|
|
};
|
|
|
|
initExtra = builtins.readFile(../files/zshrc) + ''
|
|
zstyle ':completion:*' cache-path ${config.xdg.cacheHome}/zsh-completion/
|
|
|
|
# Load fzf tab plugin
|
|
source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.zsh
|
|
'';
|
|
}
|