-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
125 lines (86 loc) · 2.75 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# uncomment to profile startup
# zmodload zsh/zprof
export SHELL=/bin/zsh
#---------- load custom zsh init
[[ -f $HOME/.zshrc_pre_custom ]] && source $HOME/.zshrc_pre_custom
#---------- oh-my-zsh
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME=""
zstyle ':omz:update' mode disabled # disable automatic updates
ENABLE_CORRECTION="false"
HIST_STAMPS="yyyy-mm-dd"
ZSH_CUSTOM=~/.oh-my-zsh-custom
plugins=(
brew
colorize
deno
docker
docker-compose
fast-syntax-highlighting
fzf-tab
gcloud
git
git-extras
golang
# iterm2
kubectl
# pip
poetry
python
# web-search
# yarn
zsh-autosuggestions
zsh-completions
zsh-syntax-highlighting
# zsh_codex
)
source $ZSH/oh-my-zsh.sh
# User configuration
# ---------- zsh-autosuggestions
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
ZSH_AUTOSUGGEST_USE_ASYNC=true
# ---------- always show completions https://unix.stackexchange.com/a/30092/230764
zstyle ':completion:*' list-prompt ''
zstyle ':completion:*' select-prompt ''
# ---------- fzf-tab
# disable sort when completing `git checkout`
zstyle ':completion:*:git-checkout:*' sort false
# set descriptions format to enable group support
zstyle ':completion:*:descriptions' format '[%d]'
# set list-colors to enable filename colorizing
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
# preview directory's content with lsd when completing cd
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'lsd -1 --color=always $realpath'
# switch group using `,` and `.`
zstyle ':fzf-tab:*' switch-group ',' '.'
zstyle ':fzf-tab:*' show-group full
# ---------- zsh-autocomple - https://github.com/marlonrichert/zsh-autocomplete
zstyle ':autocomplete:*' min-input 1
zstyle ':autocomplete:tab:*' insert-unambiguous yes
zstyle ':autocomplete:tab:*' widget-style menu-complete
#---------- load up shell agnostic interactive config
if [[ -e $HOME/.shell_interactive.sh ]]; then
source $HOME/.shell_interactive.sh
fi
# ---------- zsh functions
source $HOME/.zsh_functions
# ---------- history
setopt HIST_SAVE_NO_DUPS INC_APPEND_HISTORY
# ---------- direnv - https://github.com/direnv/direnv
eval "$(direnv hook zsh)"
# ---------- fzf
[ -f "$HOME"/.fzf.zsh ] && source "$HOME"/.fzf.zsh
# ---------- google cloud sdk
if [ -f "$HOME"/.local/google-cloud-sdk/path.zsh.inc ]; then
source "$HOME"/.local/google-cloud-sdk/path.zsh.inc
source "$HOME"/.local/google-cloud-sdk/completion.zsh.inc
fi
# ---------- bit - https://github.com/chriswalz/bit
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C $HOME/.local/bin/bit bit
# ---------- zsh codex - https://github.com/tom-doerr/zsh_codex
bindkey '^X' create_completion
#---------- command prompt
eval "$(starship init zsh)"
# uncomment to profile startup
# zprof