-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.zshrc
More file actions
128 lines (99 loc) · 3.25 KB
/
.zshrc
File metadata and controls
128 lines (99 loc) · 3.25 KB
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
126
127
128
set -kJ
autoload -Uz compinit
setopt INC_APPEND_HISTORY
zstyle ':completion:*' menu select
zmodload zsh/complist
# zi
if [[ ! -d ~/.zi ]]; then
mkdir ~/.zi
git clone https://github.com/z-shell/zi.git ~/.zi/bin
fi
source "$HOME/.zi/bin/zi.zsh"
autoload -Uz _zi
(( ${+_comps} )) && _comps[zi]=_zi
# zi plugins
zi ice lucid wait"0" atinit"zpcompinit; zpcdreplay"
zi light zdharma/fast-syntax-highlighting
# # 0 -- vanilla completion (abc => abc)
# 1 -- smart case completion (abc => Abc)
# 2 -- word flex completion (abc => A-big-Car)
# 3 -- full flex completion (abc => ABraCadabra)
zstyle ':completion:*' matcher-list '' \
'm:{a-z\-}={A-Z\_}' \
'r:[^[:alpha:]]||[[:alpha:]]=** r:|=* m:{a-z\-}={A-Z\_}' \
'r:|?=** m:{a-z\-}={A-Z\_}'
# use fzf for tab completion
# zinit light Aloxaf/fzf-tab
zi ice lucid wait"0" blockf
zi light zsh-users/zsh-completions
if command -v rbenv &> /dev/null; then
zinit ice wait"0" lucid
zinit light htlsne/zinit-rbenv
fi
zinit wait lucid for OMZL::history.zsh
# install completions
zi ice as"completion"
zi snippet OMZP::docker/completions/_docker
zi ice as"completion"
zi snippet OMZP::docker-compose/_docker-compose
export EDITOR=nvim
export GOPATH=$HOME/Code/go
# emacs keybindings
bindkey '^A' beginning-of-line
bindkey '^E' end-of-line
bindkey '^L' clear-screen
autoload edit-command-line
zle -N edit-command-line
bindkey "^X^E" edit-command-line
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
# export PATH="$PATH:$HOME/bin:$HOME/Library/Haskell/bin/:$GOPATH:$HOME/.rvm/bin:$HOME/Code/go/bin:$HOME/.gpkg/bin:node_modules/.bin:../node_modules/.bin:../../node_modules/.bin:../../../node_modules/.bin:/usr/local/opt/llvm/bin:/Users/schniz/.luarocks/bin"
export PATH="$HOME/Code/dotfiles/bin:$HOME/Code/fnm/target/debug:$HOME/Code/gpkg/target/debug:$HOME/.gpkg/bin:$HOME/.cargo/bin:/opt/homebrew/bin:/opt/homebrew/opt/util-linux/bin:$PATH:$GOPATH/bin:./node_modules/.bin:../node_modules/.bin:../../node_modules/.bin"
# fnm
eval "$(fnm env --use-on-cd --version-file-strategy=recursive --corepack-enabled --resolve-engines)"
source ~/.dotfiles/aliases
# Load all custom zsh functions
for file in ~/.dotfiles/zsh-functions/*; do
source $file
done
if [ -f ~/.secrets ]; then
source ~/.secrets
fi
configkube() {
source <(kubectl completion zsh)
}
if command -v fzf &> /dev/null; then
source <(fzf --zsh)
fi
if command -v zoxide &> /dev/null; then
eval "$(zoxide init zsh)"
fi
if [ ! "$TMUX" = "" ]; then export TERM=xterm-256color; fi
source <(starship init zsh)
function cdgr() {
cd $(gitroot)
}
# Bun
export BUN_INSTALL="/Users/schniz/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
# bun completions
# [ -s "/Users/schniz/.bun/_bun" ] && source "/Users/schniz/.bun/_bun"
function screenshell() {
if [ "$STARSHIP_CONFIG" = "" ]; then
export STARSHIP_CONFIG=~/.config/starship-screenshot.toml
else
unset STARSHIP_CONFIG
fi
}
# ghostty {
if [[ -n $GHOSTTY_RESOURCES_DIR ]]; then
source "$GHOSTTY_RESOURCES_DIR"/shell-integration/zsh/ghostty-integration
fi
# }
# pnpm
export PNPM_HOME="/Users/schniz/Library/pnpm"
export PATH="$PNPM_HOME:$PATH"
# pnpm end
export BAT_THEME='base16'
export NVIM_APPNAME='schnizvim'
# ni https://github.com/antfu-collective/ni
export NI_CONFIG_FILE="$HOME/.config/ni/nirc"