#!/bin/zsh

# emacs-style keybindings
bindkey -e

# Aliases
alias grep='rg'
alias ls='eza'
alias sl='eza'
alias ll='eza -alF'
alias la='eza -a'
alias l='eza'
alias lal='eza -al'
alias cat='bat'
alias ip='ip --color=auto'

# history stuff
HISTSIZE=10000
SAVEHIST=10000
HISTFILE="$XDG_CACHE_HOME/zsh/history"
setopt HIST_IGNORE_DUPS
setopt HIST_REDUCE_BLANKS
setopt HIST_FIND_NO_DUPS

# options
setopt auto_param_slash
setopt interactive_comments

# disable C-s
stty stop undef

# fzf
source <(fzf --zsh)

# Enable command completion
autoload -Uz compinit && compinit

# completion stuff
zstyle ':completion:*' menu select
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'

# plugins
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh

# zoxide
eval "$(zoxide init zsh)"

# prompt
# eval "$(starship init zsh)"

PROMPT="[%F{#89b4fa}%n %F{#f5c2e7}%~%f] %F{#a6e3a1}λ%f "
RPROMPT="[%F{#fab387}%?%f]"
