2024-07-11 10:09:38 +00:00
|
|
|
# Zinit
|
|
|
|
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
|
|
|
|
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
|
|
|
|
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.zinit/bin" && \
|
|
|
|
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
|
|
|
|
print -P "%F{160}▓▒░ The clone has failed.%f%b"
|
|
|
|
fi
|
|
|
|
|
|
|
|
source "$HOME/.zinit/bin/zinit.zsh"
|
|
|
|
autoload -Uz _zinit
|
|
|
|
(( ${+_comps} )) && _comps[zinit]=_zinit
|
|
|
|
|
|
|
|
# Plugins
|
|
|
|
zi load zsh-users/zsh-autosuggestions
|
|
|
|
zi load zsh-users/zsh-completions
|
|
|
|
zi load zdharma-continuum/fast-syntax-highlighting
|
|
|
|
zi load starship/starship
|
|
|
|
zi snippet PZTM::history
|
|
|
|
zi snippet PZTM::completion
|
|
|
|
|
|
|
|
# Fixes for unicode
|
|
|
|
setopt COMBINING_CHARS
|
|
|
|
setopt NO_HUP # fixes topgrade
|
|
|
|
|
2024-07-11 11:53:41 +00:00
|
|
|
# Source exports, aliases and functions
|
|
|
|
source ~/.zsh/exports.sh
|
|
|
|
source ~/.zsh/aliases.sh
|
|
|
|
source ~/.zsh/functions.sh
|
2024-07-11 10:09:38 +00:00
|
|
|
|
2024-07-11 11:53:41 +00:00
|
|
|
# easy vim/terminal switch after loading zsh-functions
|
2024-07-11 10:09:38 +00:00
|
|
|
zle -N fancy-ctrl-z
|
|
|
|
bindkey '^Z' fancy-ctrl-z
|
|
|
|
|
|
|
|
# other tools init, pyenv + rbenv are sandboxd
|
|
|
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
|
|
|
eval "$(starship init zsh)"
|
|
|
|
eval "$(zoxide init zsh)"
|
|
|
|
eval "$(rbenv init - --no-rehash)"
|
|
|
|
eval "$(pyenv init --path --no-rehash)"
|
|
|
|
|
|
|
|
# chat-gpt, hooray
|
|
|
|
source ~/OPENAI_API_KEY.sh
|