This commit is contained in:
js0ny 2025-10-29 19:55:54 +00:00
parent cd9c91b9bc
commit fbe299a28c
16 changed files with 67 additions and 17 deletions

View file

@ -1,12 +1,47 @@
{config, pkgs, ...}: let
aliases = import ./aliases.nix { pkgs = pkgs; };
{
config,
pkgs,
...
}: let
aliases = import ./aliases.nix {pkgs = pkgs;};
in {
home.packages = with pkgs; [
zsh-fzf-tab
];
programs.zsh = {
enable = true;
autocd = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
historySubstringSearch.enable = true;
enableCompletion = true;
dotDir = "${config.xdg.configHome}/zsh";
shellAliases = aliases;
syntaxHighlighting = {
enable = true;
patterns = {
"rm -rf *" = "fg=blue,bold,bg=red";
};
highlighters = [
"main"
"pattern"
"brackets"
"root"
];
};
initContent = ''
# Emacs Hybrid
bindkey '^A' beginning-of-line
bindkey '^E' end-of-line
bindkey '^F' forward-char
bindkey '^B' backward-char
bindkey '^P' up-line-or-history
bindkey '^N' down-line-or-history
# bindkey '^R' history-incremental-search-backward # Use fzf
bindkey '^K' kill-line
bindkey -M viins '^?' backward-delete-char
bindkey -M viins '^H' backward-kill-word
source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
'';
};
}
}