feat(zsh): add zoxide, load everything optionally

This commit is contained in:
winston 2022-12-09 07:09:24 +01:00
parent f7d04b9da6
commit 88a8ae8307
Signed by: winston
GPG key ID: 3786770EDBC2B481
2 changed files with 8 additions and 7 deletions

View file

@ -5,6 +5,8 @@ export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache" export XDG_CACHE_HOME="$HOME/.cache"
export EDITOR="nvim" export EDITOR="nvim"
export SUDO_EDITOR="nvim"
export TERMINAL="wezterm-gui"
export HISTFILE="$XDG_CONFIG_HOME/zsh/history" export HISTFILE="$XDG_CONFIG_HOME/zsh/history"
export LESSHISTFILE="-" # don't write a less history export LESSHISTFILE="-" # don't write a less history
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg" export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"

View file

@ -1,10 +1,11 @@
# vim:ft=zsh:fenc=utf-8:fdm=marker # vim:ft=zsh:fenc=utf-8:fdm=marker
# load starship # load starship
eval "$(starship init zsh)" [[ -x "$(command -v starship)" ]] && eval "$(starship init zsh)"
### plugins via antigen {{{ ### plugins via antigen {{{
# don't pollute $HOME with antigen # don't pollute $HOME with antigen
ADOTDIR="$XDG_DATA_HOME/antigen" ADOTDIR="$XDG_DATA_HOME/antigen"
# bootstrap antigen
if [[ ! -d "$ADOTDIR" ]]; then if [[ ! -d "$ADOTDIR" ]]; then
mkdir -p "$ADOTDIR" mkdir -p "$ADOTDIR"
curl -L https://git.io/antigen > "$ADOTDIR/antigen.zsh" curl -L https://git.io/antigen > "$ADOTDIR/antigen.zsh"
@ -79,6 +80,8 @@ elif [ -x "$(command -v bat)" ]; then
alias cat='bat' alias cat='bat'
fi fi
[[ -x "$(command -v zoxide)" ]] && eval "$(zoxide init zsh)"
# use neovim as vim, if installed # use neovim as vim, if installed
if [[ -x "$(command -v nvim)" ]]; then if [[ -x "$(command -v nvim)" ]]; then
alias vim='nvim' alias vim='nvim'
@ -167,14 +170,10 @@ function debugnvim() {
### languages & frameworks {{{ ### languages & frameworks {{{
# python, my old friend # python, my old friend
if [ -x "$(command -v pyenv)" ]; then [[ -x "$(command -v pyenv)" ]] && eval "$(pyenv init -)"
eval "$(pyenv init -)"
fi
# ruby # ruby
if [ -x "$(command -v rbenv)" ]; then [[ -x "$(command -v rbenv)" ]] && eval "$(rbenv init - zsh)"
eval "$(rbenv init - zsh)"
fi
# node # node
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"