-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzsh.nix
71 lines (70 loc) · 1.63 KB
/
zsh.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{ pkgs, ... }:
{
programs.zsh = {
enable = true;
initExtraFirst = ''
DIRSTACKSIZE=100
setopt auto_pushd
setopt pushd_ignore_dups
setopt nolistbeep
setopt interactive_comments
setopt magic_equal_subst
setopt hist_verify
'';
autocd = true;
autosuggestion.enable = true;
completionInit = "autoload -Uz compinit && compinit";
enableCompletion = true;
history = {
size = 100000;
save = 100000;
ignoreAllDups = true;
};
sessionVariables = {
ABBR_SET_EXPANSION_CURSOR = 1;
};
shellAliases = {
ls = "lsd";
};
zsh-abbr = {
enable = true;
abbreviations = {
l = "ls -l";
la = "ls -a";
lla = "ls -la";
lt = "ls --tree";
":q" = "exit";
ga = "git add";
gst = "git status";
gcm = "git commit -m \"%\"";
gd = "git diff";
};
};
syntaxHighlighting = {
enable = true;
highlighters = [
"main"
"brackets"
"pattern"
];
patterns = {
"rm *" = "fg=white,bold,bg=red";
};
styles = {
autodirectory = "fg=brack,bg=green";
bracket-level-1 = "fg=blue,bold";
bracket-level-2 = "fg=green,bold";
bracket-level-3 = "fg=yellow,bold";
bracket-level-4 = "fg=magenta,bold";
};
};
initExtra = ''
if [[ -f "$HOME/.zsh/plugins/zsh-abbr//share/zsh/zsh-abbr/zsh-abbr.zsh" ]]; then
source "$HOME/.zsh/plugins/zsh-abbr//share/zsh/zsh-abbr/zsh-abbr.zsh"
fi
for p in ${pkgs.fzf}/share/fzf/*.zsh; do
. $p
done
'';
};
}