-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathzshrc
107 lines (79 loc) · 2.55 KB
/
zshrc
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# ======== Cache directory (for oh-my-zsh plugins) =========
[ ! -d $HOME/.zcustom/cache ] && mkdir -p $HOME/.zcustom/cache
export ZSH="$HOME/.zcustom"
export ZSH_CACHE_DIR="$ZSH/cache"
# ======== Random settings ===========
# Disable auto title so tmux window titles don't get messed up.
export DISABLE_AUTO_TITLE="true"
# Maintain a stack of cd directory traversals for `popd`
setopt AUTO_PUSHD
# Allow extended matchers like ^file, etc
set -o EXTENDED_GLOB
# ========= History settings =========
if [ -z "$HISTFILE" ]; then
HISTFILE=$HOME/.zsh_history
fi
HISTSIZE=10000
SAVEHIST=10000
setopt append_history
setopt extended_history
setopt hist_expire_dups_first
setopt hist_ignore_dups # ignore duplication command history list
setopt hist_ignore_space
setopt inc_append_history
setopt share_history # share command history data
setopt extended_glob
# =========== Plugins ============
source $HOME/.zsh/vendor/antigen.zsh
antigen bundle robbyrussell/oh-my-zsh plugins/git
if [ ! -f ~/.config/dotfiles/no-nvm ]; then
antigen bundle robbyrussell/oh-my-zsh plugins/nvm
fi
antigen bundle robbyrussell/oh-my-zsh plugins/pyenv
if [ ! -f ~/.config/dotfiles/rbenv ]; then
antigen bundle robbyrussell/oh-my-zsh plugins/rvm
else
antigen bundle robbyrussell/oh-my-zsh plugins/rbenv
fi
# vim mode
# export ZVM_VI_ESCAPE_BINDKEY=jk
# antigen bundle jeffreytse/zsh-vi-mode
antigen bundle dbalatero/fzf-git
antigen bundle DarrinTisdale/zsh-aliases-exa
antigen bundle chriskempson/base16-shell
antigen bundle wookayin/fzf-fasd
antigen bundle twang817/zsh-ssh-agent
antigen bundle zsh-users/zsh-completions
antigen bundle dbalatero/fast-syntax-highlighting
antigen bundle hlissner/zsh-autopair
# antigen theme romkatv/powerlevel10k
if [ ! -f ~/.config/dotfiles/no-nvm ]; then
export NVM_LAZY_LOAD=true
export NVM_AUTO_USE=true
antigen bundle lukechilds/zsh-nvm
fi
antigen apply
[ -f ~/.base16_theme ] && source ~/.base16_theme
eval "$(direnv hook zsh)"
eval "$(fasd --init auto)"
if [ -f ~/.config/dotfiles/no-nvm ]; then
eval "$(nodenv init -)"
fi
# =========== Custom settings ================
for file in $HOME/.zsh/custom/**/*.zsh
do
source $file
done
source $HOME/.zsh/themes/original.zsh
for file in $HOME/.zsh/secrets/**/*.zsh
do
source $file
done
# ======= RVM is a special snowflake and needs to be last ========
if [ ! -f ~/.config/dotfiles/rbenv ]; then
export PATH="$HOME/.rvm/bin:$PATH"
[ -f ~/.rvm/scripts/rvm ] && source ~/.rvm/scripts/rvm
fi
[ -f ~/.zshrc.local ] && source ~/.zshrc.local
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
eval "$(starship init zsh)"