This commit is contained in:
cy 2024-12-25 04:58:40 +00:00
parent 602ff534b2
commit 372ff20917
3 changed files with 13 additions and 20 deletions

View file

@ -2,7 +2,7 @@
{ {
imports = [ imports = [
../tmux.nix ../tmux.nix
../fish.nix ../zsh
]; ];
home.sessionVariables = { home.sessionVariables = {

View file

@ -1,4 +1,4 @@
{ ... }: { pkgs, ... }:
{ {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
@ -9,28 +9,22 @@
"completion" "completion"
]; ];
}; };
enableCompletion = true;
syntaxHighlighting = { syntaxHighlighting = {
enable = true; enable = true;
highlighters = [ "brackets" ]; highlighters = [ "brackets" ];
}; };
autocd = true; autocd = true;
defaultKeymap = "emacs"; defaultKeymap = "emacs";
antidote = {
enable = true; initExtraFirst = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
useFriendlyNames = true; # why not?
plugins = [
"zsh-users/zsh-completions"
"romkatv/powerlevel10k"
"Aloxaf/fzf-tab"
"ohmyzsh/ohmyzsh path:plugins/colored-man-pages"
];
};
history = { history = {
ignoreDups = true; ignoreDups = true;
ignoreAllDups = true; ignoreAllDups = true;
ignoreSpace = true; ignoreSpace = true;
save = 50000; save = 10000;
size = 50000; size = 10000;
append = true; append = true;
}; };
historySubstringSearch = { historySubstringSearch = {
@ -40,10 +34,6 @@
}; };
initExtra = '' initExtra = ''
source ${./p10k.zsh} source ${./p10k.zsh}
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls $realpath'
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-prewview 'ls $realpath'
#disable control+s to pause terminal #disable control+s to pause terminal
unsetopt FLOW_CONTROL unsetopt FLOW_CONTROL

View file

@ -26,6 +26,9 @@
programs.command-not-found.enable = false; programs.command-not-found.enable = false;
programs.nix-index.enable = true; programs.nix-index.enable = true;
users.users.yt.shell = pkgs.fish; users.users.yt.shell = pkgs.zsh;
programs.fish.enable = true; programs.zsh.enable = true;
# needed for zsh.enableCompletion to work
environment.pathsToLink = [ "/share/zsh" ];
} }