autoload -Uz compinit && compinit

# history
HISTFILE="$HOME/.zsh_history"
HISTSIZE=10000
SAVEHIST=10000
setopt APPEND_HISTORY
setopt INC_APPEND_HISTORY
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_SPACE

# homebrew, load first because it manages many downstream dependencies from here
[ -f "/opt/homebrew/bin/brew" ] && eval "$(/opt/homebrew/bin/brew shellenv)"
[ -f "/home/linuxbrew/.linuxbrew/bin/brew" ] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

# gpg
export GPG_TTY=$(tty)

# starship
eval "$(starship init zsh)"

# fzf
source <(fzf --zsh)

# direnv
eval "$(direnv hook zsh)"

# 1password cli plugins
[ -f "/Users/sethetter/.config/op/plugins.sh" ] && source /Users/sethetter/.config/op/plugins.sh

export PATH="$HOME/.local/share/mise/shims:$PATH"
export PATH="$HOME/.bun/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.ghcup/bin:$PATH"

# pnpm
export PNPM_HOME="/Users/sethetter/Library/pnpm"
case ":$PATH:" in
	*":$PNPM_HOME:"*) ;;
	*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end

if command -v wt >/dev/null 2>&1; then eval "$(command wt config shell init zsh)"; fi
