Configuration files
at dev 2.1 kB view raw
1ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" 2[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)" 3[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" 4source "${ZINIT_HOME}/zinit.zsh" 5 6ZSH_AUTOSUGGEST_STRATEGY=(history completion) 7 8if [ -x "$(which jj)" ]; then 9 JJ_INSTALLED="$(which jj)" 10fi 11 12zinit wait lucid for \ 13 atinit"zicompinit; zicdreplay" \ 14 zdharma-continuum/fast-syntax-highlighting \ 15 atload"_zsh_autosuggest_start" \ 16 zsh-users/zsh-autosuggestions \ 17 blockf atpull'zinit creinstall -q .' \ 18 atload"if [ -v JJ_INSTALLED ]; then; source <(jj util completion zsh); fi" \ 19 atload"if [ -v JJ_INSTALLED ]; then; source <(COMPLETE=zsh jj); fi" \ 20 zsh-users/zsh-completions 21 22zinit id-as"auto" for \ 23 atload"bindkey -e" \ 24 "https://git.sr.ht/~kareigu/zsh-utils/blob/main/editor/editor.plugin.zsh" \ 25 atload'eval "$(fzf --zsh)"' \ 26 "https://git.sr.ht/~kareigu/zsh-utils/blob/main/history/history.plugin.zsh" \ 27 28zstyle ':completion:*' menu yes select 29unsetopt LIST_BEEP 30 31export PATH=~/.cargo/bin/:$PATH 32export PATH=~/.zvm/bin:$PATH 33export PATH=~/.local/bin:$PATH 34 35if [ -x "$(which starship)" ]; then 36 eval "$(starship init zsh)" 37else 38 echo "starship not in path" 39fi 40 41if [ -x "$(which zoxide)" ]; then 42 eval "$(zoxide init zsh --cmd cd)" 43else 44 echo "zoxide not in path" 45fi 46 47export GPG_TTY=$(tty) 48 49if [ -x "$(which nvim)" ]; then 50 export EDITOR='nvim' 51elif [ -x "$(which vim)" ]; then 52 export EDITOR='vim' 53else 54 export EDITOR='vi' 55fi 56 57if [ -x "$(which batman)" ]; then 58 eval "$(batman --export-env)" 59fi 60 61if [ -x "$(which opam)" ]; then 62 eval "$(opam env --switch=default)" 63fi 64 65 66LOCAL_ZSH_PATH="$HOME/.local.zsh" 67if [ -f "$LOCAL_ZSH_PATH" ]; then 68 source "$LOCAL_ZSH_PATH" 69fi 70 71# git 72alias gs="git status" 73alias gap="git add -p" 74alias gpl="git pull" 75alias gp="git push" 76alias gc="git commit" 77alias lzg=lazygit 78 79if [ -x "$(which lsr)" ]; then 80 alias ls="lsr" 81elif [ -x "$(which lsd)" ]; then 82 alias ls="lsd" 83fi 84alias l="ls -la" 85alias la="ls -lA"