export TERM=xterm-256color

export EDITOR=nvim
export SUDO_EDITOR=nvim

export GOPATH="$HOME/.local/go"

export HISTSIZE=10000
export SAVEHIST=10000
export HISTFILE="$HOME/.cache/zsh/history"

setopt append_history
setopt inc_append_history
setopt share_history
setopt interactive_comments
setopt autocd
setopt auto_param_slash
setopt dot_glob
setopt extended_glob

export PATH="$HOME/.local/bin:$HOME/.local/go/bin:$HOME/opt/bin:$PATH"
export LD_LIBRARY_PATH="$HOME/opt/lib:${LD_LIBRARY_PATH:-}"

alias ls='ls --color=auto'
alias ll='ls -lah'
alias gg='lazygit'
alias v='nvim'
alias rr='russ read'
alias cp='cp -v'
alias sd='st -d "$(pwd)" > /dev/null 2>&1 & disown'

take() {
  mkdir -p -- "$1" && cd -- "$1"
}

bindkey -e

autoload -Uz compinit colors
autoload -U bashcompinit

colors
compinit
bashcompinit

PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "

if [ -f "$HOME/.zprofile" ]; then
  source "$HOME/.zprofile"
fi

if [ -x /home/linuxbrew/.linuxbrew/bin/brew ]; then
  eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi

ZAP_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/zap"

if [ -f "$ZAP_DIR/zap.zsh" ]; then
  source "$ZAP_DIR/zap.zsh"
fi

plug "zsh-users/zsh-autosuggestions"
plug "zsh-users/zsh-syntax-highlighting"
plug "zap-zsh/sudo"
plug "Aloxaf/fzf-tab"
