2022-02-07 13:04:58 +01:00
|
|
|
{ config, pkgs }:
|
|
|
|
|
2023-01-03 07:57:46 +01:00
|
|
|
# Sources:
|
|
|
|
# https://thevaluable.dev/zsh-install-configure-mouseless/
|
|
|
|
# https://thevaluable.dev/zsh-completion-guide-examples/
|
|
|
|
|
2022-02-07 13:04:58 +01:00
|
|
|
{
|
|
|
|
enable = true;
|
|
|
|
|
2022-10-11 20:34:09 +02:00
|
|
|
dotDir = ".config/zsh";
|
|
|
|
|
2023-02-27 07:50:43 +01:00
|
|
|
autocd = false;
|
2022-02-07 13:04:58 +01:00
|
|
|
|
|
|
|
defaultKeymap = "viins";
|
|
|
|
|
2022-04-14 15:09:28 +02:00
|
|
|
# Can be re sourced via: __HM_ZSH_SESS_VARS_SOURCED= source ~/.zshenv
|
2022-02-07 13:04:58 +01:00
|
|
|
sessionVariables = {
|
|
|
|
# Reduce timeout after <ESC> (vi keybindings)
|
|
|
|
KEYTIMEOUT = 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
history = {
|
2023-04-26 09:22:39 +02:00
|
|
|
size = 100000;
|
|
|
|
save = 100000;
|
2022-02-07 13:04:58 +01:00
|
|
|
ignoreDups = true;
|
|
|
|
ignoreSpace = true;
|
|
|
|
extended = true;
|
|
|
|
share = false;
|
2022-10-11 20:34:09 +02:00
|
|
|
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
2022-02-07 13:04:58 +01:00
|
|
|
};
|
|
|
|
|
2023-07-03 07:22:30 +02:00
|
|
|
syntaxHighlighting = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2023-01-03 08:06:26 +01:00
|
|
|
initExtra = builtins.readFile(../files/zshrc) + ''
|
|
|
|
zstyle ':completion:*' cache-path ${config.xdg.cacheHome}/zsh-completion/
|
2023-03-02 12:18:46 +01:00
|
|
|
|
|
|
|
# Load fzf tab plugin
|
|
|
|
source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.zsh
|
2023-01-03 08:06:26 +01:00
|
|
|
'';
|
2022-02-07 13:04:58 +01:00
|
|
|
}
|