autoload -U +X bashcompinit && bashcompinit
autoload -U +X compinit && compinit

# Run brew-autoupdate
brew-autoupdate

eval "$(oh-my-posh init zsh --config ~/dotfiles/misc_config/ohmyposh.json)"
eval "$(wut init)"

source $(brew --prefix nvm)/nvm.sh
source <(fzf --zsh)

# Load seperated config files
for conf in "$HOME/dotfiles/zsh_config/"*.zsh; do
  source "${conf}"
done
unset conf

# eval "$(wut init)"
eval "$(thefuck --alias)"
eval "$(zoxide init zsh)"
eval "$(atuin init zsh)"

# bun completions
[ -s "/Users/ghall/.bun/_bun" ] && source "/Users/ghall/.bun/_bun"

# ggc completions
if [ -f "$(go env GOPATH)/pkg/mod/github.com/bmf-san/ggc/v5@*/tools/completions/ggc.zsh" ]; then
  . "$(go env GOPATH)"/pkg/mod/github.com/bmf-san/ggc/v5@*/tools/completions/ggc.zsh
fi

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

. "$HOME/.atuin/bin/env"
