fix(zsh): fixed highlighting not working on history-search-end
This commit is contained in:
parent
8cd3771da0
commit
9670f735a2
|
@ -70,6 +70,20 @@ in {
|
|||
flip mapAttrs hmUserCfg.home.persistence
|
||||
(_: sourceCfg: {
|
||||
users.${user} = {
|
||||
# This needs to be set for allo users with non
|
||||
# standart home (not /home/<userName>
|
||||
# due to nixpkgs it
|
||||
# can't be deduced from homeDirectory
|
||||
# as there will be infinite recursion
|
||||
# If this setting is forgotten there
|
||||
# are assertions in place warning you
|
||||
home =
|
||||
{
|
||||
patrick = "/home/patrick";
|
||||
root = "/root";
|
||||
}
|
||||
.${user}
|
||||
or {};
|
||||
files = mkUserFiles sourceCfg.files;
|
||||
directories = mkUserDirs sourceCfg.directories;
|
||||
};
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
programs.nix-index.enable = true;
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
|
@ -35,6 +36,15 @@
|
|||
share = false;
|
||||
};
|
||||
initExtra = builtins.readFile ./zshrc;
|
||||
# This needs to be loaded befor zsh-fast-syntax-highlighting
|
||||
# is sourced as that overwrites all widgets to redraw with highlighting
|
||||
initExtraBeforeCompInit = ''
|
||||
if autoload history-search-end; then
|
||||
zle -N history-beginning-search-backward-end history-search-end
|
||||
zle -N history-beginning-search-forward-end history-search-end
|
||||
fi
|
||||
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "fzf-tab";
|
||||
|
@ -87,4 +97,7 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
home.persistence."/state".directories = [
|
||||
".local/share/zsh"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -97,12 +97,6 @@ function zshaddhistory() {
|
|||
emulate -L zsh
|
||||
[[ ! $1 =~ "$HISTORY_IGNORE_REGEX" ]]
|
||||
}
|
||||
|
||||
if autoload history-search-end; then
|
||||
zle -N history-beginning-search-backward-end history-search-end
|
||||
zle -N history-beginning-search-forward-end history-search-end
|
||||
fi
|
||||
|
||||
# Delete all keybinds and use emacs-like key bindings by default:
|
||||
bindkey -d
|
||||
bindkey -e
|
||||
|
|
Loading…
Reference in a new issue