-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.zshrc
More file actions
169 lines (128 loc) · 6.15 KB
/
.zshrc
File metadata and controls
169 lines (128 loc) · 6.15 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# Path to your dotfiles.
export DOTFILES=$HOME/.dotfiles
# Would you like to use another custom folder than $ZSH/custom?
ZSH_CUSTOM="$DOTFILES/zsh"
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# ------------------------------------------------------------------------------
# Oh My Zsh Settings (zstyle)
# ------------------------------------------------------------------------------
zstyle ':omz:*' case-sensitive false
zstyle ':omz:*' hyphen-insensitive true
zstyle ':omz:*' completion-waiting-dots true
zstyle ':omz:update' frequency 7
zstyle ':omz:update' mode auto
ZSH_DISABLE_COMPFIX=true
ENABLE_CORRECTION="false"
HIST_STAMPS="dd.mm.yyyy"
# ------------------------------------------------------------------------------
# History
# ------------------------------------------------------------------------------
HISTSIZE=10000
HISTFILE=~/.zsh_history
SAVEHIST=$HISTSIZE
HISTDUP=erase
setopt appendhistory
setopt sharehistory
setopt hist_ignore_space
setopt hist_ignore_all_dups
setopt hist_save_no_dups
setopt hist_ignore_dups
setopt hist_find_no_dups
# ------------------------------------------------------------------------------
# Plugins
# ------------------------------------------------------------------------------
plugins=(
aliases alias-finder git macos npm composer node vagrant
zsh-syntax-highlighting zsh-completions
)
# alias-finder: show matching aliases when typing long commands
zstyle ':omz:plugins:alias-finder' autoload yes
zstyle ':omz:plugins:alias-finder' longer yes
zstyle ':omz:plugins:alias-finder' exact yes
zstyle ':omz:plugins:alias-finder' cheaper yes
# zsh-completions: add to fpath before compinit (which oh-my-zsh runs)
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
source $ZSH/oh-my-zsh.sh
# Enable autosuggestions (custom plugin, sourced manually)
source $DOTFILES/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
# ------------------------------------------------------------------------------
# Source dotfiles
# ------------------------------------------------------------------------------
[ -f "$DOTFILES/.functions" ] && source "$DOTFILES/.functions"
# Import ssh keys in keychain
ssh-add --apple-load-keychain 2>/dev/null;
# ------------------------------------------------------------------------------
# PATH
# ------------------------------------------------------------------------------
export PATH="$HOME/.local/bin:$PATH"
export PATH="/opt/homebrew/bin:$PATH"
export PATH="/usr/local/bin:$PATH"
export PATH="$HOME/.composer/vendor/bin:$PATH"
# Do not update all homebrew stuff automatically
export HOMEBREW_NO_AUTO_UPDATE=1
# ------------------------------------------------------------------------------
# Herd + NVM (NVM must load before Herd's zshrc calls nvm_find_nvmrc)
# ------------------------------------------------------------------------------
export PATH="$HOME/Library/Application Support/Herd/bin":$PATH
export HERD_PHP_84_INI_SCAN_DIR="$HOME/Library/Application Support/Herd/config/php/84/"
export HERD_PHP_83_INI_SCAN_DIR="$HOME/Library/Application Support/Herd/config/php/83/"
export HERD_PHP_82_INI_SCAN_DIR="$HOME/Library/Application Support/Herd/config/php/82/"
export HERD_PHP_81_INI_SCAN_DIR="$HOME/Library/Application Support/Herd/config/php/81/"
export HERD_PHP_74_INI_SCAN_DIR="$HOME/Library/Application Support/Herd/config/php/74/"
export NVM_DIR="$HOME/Library/Application Support/Herd/config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[[ -f "/Applications/Herd.app/Contents/Resources/config/shell/zshrc.zsh" ]] && builtin source "/Applications/Herd.app/Contents/Resources/config/shell/zshrc.zsh"
# ------------------------------------------------------------------------------
# Tools
# ------------------------------------------------------------------------------
# EZA completions
export FPATH="$HOME/eza/completions/zsh:$FPATH"
# Antigravity
export PATH="$HOME/.antigravity/antigravity/bin:$PATH"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
# opencode
export PATH="$HOME/.opencode/bin:$PATH"
# ------------------------------------------------------------------------------
# fzf + fzf-tab
# ------------------------------------------------------------------------------
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude .git'
source <(fzf --zsh)
# Completion styling
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath'
# fzf-tab: must be loaded AFTER compinit and fzf
source $DOTFILES/zsh/plugins/fzf-tab/fzf-tab.plugin.zsh
# ------------------------------------------------------------------------------
# Keybindings
# ------------------------------------------------------------------------------
bindkey -e
bindkey '^p' history-search-backward
bindkey '^n' history-search-forward
bindkey '^[w' kill-region
zle_highlight+=(paste:none)
# zoxide
eval "$(zoxide init --cmd cd zsh)"
# ------------------------------------------------------------------------------
# Starship prompt (must be last)
# ------------------------------------------------------------------------------
export STARSHIP_CONFIG="$DOTFILES/.config/starship.toml"
eval "$(starship init zsh)"
# Herd injected PHP 8.4 configuration.
export HERD_PHP_84_INI_SCAN_DIR="/Users/sascha/Library/Application Support/Herd/config/php/84/"
# Herd injected PHP 8.3 configuration.
export HERD_PHP_83_INI_SCAN_DIR="/Users/sascha/Library/Application Support/Herd/config/php/83/"
# Herd injected PHP 8.2 configuration.
export HERD_PHP_82_INI_SCAN_DIR="/Users/sascha/Library/Application Support/Herd/config/php/82/"
# Herd injected PHP 8.1 configuration.
export HERD_PHP_81_INI_SCAN_DIR="/Users/sascha/Library/Application Support/Herd/config/php/81/"
# Herd injected PHP 7.4 configuration.
export HERD_PHP_74_INI_SCAN_DIR="/Users/sascha/Library/Application Support/Herd/config/php/74/"