-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
122 lines (96 loc) · 2.96 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
# Variables
export EDITOR=nvim
export MANPAGER='nvim +Man!'
# https://superuser.com/questions/700406/zsh-not-recognizing-ls-colors
export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
export CLICOLOR=1
export LESS=-x4icWRM
export YDIFF_OPTIONS='--width=0'
export RANGER_LOAD_DEFAULT_RC=FALSE
export RIPGREP_CONFIG_PATH=$HOME/.ripgreprc
export PIPENV_VENV_IN_PROJECT=1
export POETRY_VIRTUALENVS_IN_PROJECT=1
export FASTLANE_SKIP_UPDATE_CHECK=1
export NEXT_TELEMETRY_DISABLED=1
export AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE=1
export BUILDKIT_PROGRESS=plain
export GRANTED_DISABLE_UPDATE_CHECK=true
export MAKEFLAGS='--no-print-directory'
# https://stackoverflow.com/a/52230415/13193129
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
export HOMEBREW_HOME=/opt/homebrew
export HOMEBREW_PREFIX=$HOMEBREW_HOME
export HOMEBREW_CELLAR=$HOMEBREW_HOME/Cellar
export HOMEBREW_REPOSITORY=$HOMEBREW_HOME
export HOMEBREW_CLEANUP_MAX_AGE_DAYS=0
export HOMEBREW_NO_ENV_HINTS=1
export HOMEBREW_NO_ANALYTICS=1
export RUBYOPT='-W0'
if [[ "$(hostname)" =~ "marcusMBP" ]]; then
export NVIM_NODE_BIN_DIR="${HOME}/.nvm/versions/node/v22.8.0/bin"
export NVIM_PYTHON_BIN_DIR="${HOME}/.pyenv/versions/3.11.0/bin"
elif [[ "$(hostname)" =~ "42singapore" ]]; then
export NVIM_NODE_BIN_DIR="${HOME}/.nvm/versions/node/v16.20.2/bin"
export NVIM_PYTHON_BIN_DIR="${HOME}/.pyenv/versions/3.10.0/bin"
fi
typeset -U path
path=(
$HOMEBREW_HOME/bin
$HOMEBREW_HOME/sbin
$HOME/.bun/bin
$HOME/.cargo/bin
$HOME/.local/bin
$HOME/.bin
$path
)
typeset -U manpath
manpath=(
$HOMEBREW_HOME/share/man
$manpath
)
# Functions
function refresh() {
echo "Refreshing shell..."
exec "$SHELL" --login
}
# Force emacs mode (do not assume vi mode)
bindkey -e
# Load all zsh.d files
for zsh_file in "$HOME"/.zsh/zsh.d/*.zsh(N); do
source "$zsh_file"
done
# Load fzf (0.30.0)
FZF_TMUX_OPTS='-p'
FZF_DEFAULT_COMMAND='rg --files --color=never'
FZF_CTRL_R_OPTS='--exact'
FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
FZF_CTRL_T_OPTS='--select-1 --exit-0'
export FZF_DEFAULT_OPTS='
--color=dark
--color=fg:-1,bg:-1,hl:#c678dd,fg+:#ffffff,bg+:#282c34,hl+:#d858fe
--color=info:#98c379,prompt:#61afef,pointer:#be5046,marker:#e5c07b,spinner:#61afef,header:#61afef
'
if [[ "$(uname -s)" = "Darwin" ]]; then
source "${HOMEBREW_HOME}/opt/fzf/shell/key-bindings.zsh"
else
source "${HOME}/.fzf.zsh"
fi
bindkey -r '\ec'
# Load plugins
if ! command -v plug &>/dev/null; then
source "${HOME}/.zsh/plug.zsh"
fi
plug use "ohmyzsh/ohmyzsh" "plugins/aws/aws.plugin.zsh"
export SHOW_AWS_PROMPT=false
plug use "rupa/z" "z.sh"
plug use "paulirish/git-open" "git-open"
plug use "hlissner/zsh-autopair" "autopair.zsh"
plug use "zsh-users/zsh-syntax-highlighting" "zsh-syntax-highlighting.zsh"
ZSH_HIGHLIGHT_HIGHLIGHTERS+=(main brackets)
ZSH_HIGHLIGHT_MAXLENGTH=60
zle_highlight+=(paste:none)
plug load
# Local configuration
if [[ -f "${HOME}/.zlocal" ]]; then
source "${HOME}/.zlocal"
fi