Migrate zsh configuration to new programs.zsh.initContent
This commit is contained in:
parent
289eecc497
commit
c14b427f49
1 changed files with 12 additions and 14 deletions
|
@ -1,5 +1,14 @@
|
||||||
{lib, config, pkgs, pkgs-unstable, ...}: {
|
{lib, config, pkgs, ...}: {
|
||||||
programs.zsh = {
|
programs.zsh = let
|
||||||
|
beforeCompInit = lib.mkOrder 550 "zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=* r:|=*'";
|
||||||
|
defaultInit = ''
|
||||||
|
setopt promptsubst
|
||||||
|
export PROMPT='%F{12}[%f%F{10}%n%f%F{12}@%f%F{white}%m%f%F{12}]%f%F{white}:%f %F{white}%~%f%F{12}>%b$(${lib.getExe pkgs.gitprompt-rs} zsh)%f%F{10}%(!.#.$)%f '
|
||||||
|
unsetopt beep
|
||||||
|
bindkey '^R' history-incremental-search-backward
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
autosuggestion.enable = true;
|
autosuggestion.enable = true;
|
||||||
|
@ -17,17 +26,6 @@
|
||||||
history.size = 10000;
|
history.size = 10000;
|
||||||
history.path = "$HOME/.zsh_history";
|
history.path = "$HOME/.zsh_history";
|
||||||
|
|
||||||
plugins = [
|
initContent = lib.mkMerge [ beforeCompInit defaultInit ];
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
initExtra = ''
|
|
||||||
setopt promptsubst
|
|
||||||
export PROMPT='%F{12}[%f%F{10}%n%f%F{12}@%f%F{white}%m%f%F{12}]%f%F{white}:%f %F{white}%~%f%F{12}>%b$(${lib.getExe pkgs-unstable.gitprompt-rs} zsh)%f%F{10}%(!.#.$)%f '
|
|
||||||
unsetopt beep
|
|
||||||
bindkey '^R' history-incremental-search-backward
|
|
||||||
'';
|
|
||||||
|
|
||||||
initExtraBeforeCompInit = "zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=* r:|=*'";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue