diff options
author | Marc Pervaz Boocha <mboocha@sudomsg.com> | 2025-07-17 21:24:15 +0530 |
---|---|---|
committer | Marc Pervaz Boocha <mboocha@sudomsg.com> | 2025-07-17 21:24:15 +0530 |
commit | c1a7e3e37eca9c543e57f2ae6ac5d848a5b4af72 (patch) | |
tree | b8fd118711dad0460b0032189dc50b5bdd4c781b /.zshrc | |
parent | Add Exrc and modulized LSPAttach (diff) | |
download | dotfiles-c1a7e3e37eca9c543e57f2ae6ac5d848a5b4af72.tar dotfiles-c1a7e3e37eca9c543e57f2ae6ac5d848a5b4af72.tar.gz dotfiles-c1a7e3e37eca9c543e57f2ae6ac5d848a5b4af72.tar.bz2 dotfiles-c1a7e3e37eca9c543e57f2ae6ac5d848a5b4af72.tar.lz dotfiles-c1a7e3e37eca9c543e57f2ae6ac5d848a5b4af72.tar.xz dotfiles-c1a7e3e37eca9c543e57f2ae6ac5d848a5b4af72.tar.zst dotfiles-c1a7e3e37eca9c543e57f2ae6ac5d848a5b4af72.zip |
Improved prompt theme and fixed lua_ls config
Diffstat (limited to '.zshrc')
-rw-r--r-- | .zshrc | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -56,4 +56,33 @@ alias help=run-help autoload -Uz e v p bell +zstyle ':vcs_info:*' check-for-changes true +zstyle ':vcs_info:*' get-revision true +zstyle ':vcs_info:*' formats "(%s)-[%b]%m%u%c" +zstyle ':vcs_info:*' actionformats "(%s)-[%b]%m%u%c" + +zstyle ':vcs_info:git*+set-message:*' hooks git-untracked + ++vi-git-untracked() { + if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' ]] && \ + git status --porcelain | grep -m 1 '^??' &>/dev/null + then + hook_com[misc]='T' + fi +} + +zstyle ':vcs_info:git*+set-message:*' hooks git-st + +function +vi-git-st() { + local ahead behind + local -a gitstatus + + ahead=$(git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l) + (( $ahead )) && gitstatus+=( "+${ahead}" ) + + behind=$(git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l) + (( $behind )) && gitstatus+=( "-${behind}" ) + + hook_com[misc]+=${(j:/:)gitstatus} +} |