mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-25 21:52:23 +00:00
fix ZSH issues
This commit is contained in:
parent
f21828ae0a
commit
bba6442cd2
3 changed files with 35 additions and 22 deletions
2
zsh/.config/zsh/.gitignore
vendored
Normal file
2
zsh/.config/zsh/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.zcompdump
|
||||
*.zwc
|
|
@ -7,7 +7,8 @@ zcompare() {
|
|||
fi
|
||||
}
|
||||
|
||||
emulate zsh -o extended_glob -c "local files=($ZDOTDIR/*/*.zsh)"
|
||||
emulate zsh -o extended_glob -c "local files=($ZDOTDIR/*.zsh)"
|
||||
for file in "${files[@]}"; do
|
||||
zcompare $file
|
||||
done
|
||||
zcompare .zshrc
|
||||
|
|
|
@ -10,34 +10,43 @@ setopt EXTENDED_HISTORY
|
|||
setopt SHARE_HISTORY
|
||||
|
||||
|
||||
|
||||
# plugins
|
||||
source ~/.zplug/init.zsh
|
||||
|
||||
zplug 'zplug/zplug', hook-build:'zplug --self-manage'
|
||||
zplug "plugins/git", from:oh-my-zsh
|
||||
zplug "zsh-users/zsh-completions"
|
||||
zplug "Aloxaf/fzf-tab", defer:2
|
||||
zplug "zsh-users/zsh-history-substring-search", defer:2
|
||||
zplug "zdharma/fast-syntax-highlighting", defer:2
|
||||
zplug "zsh-users/zsh-autosuggestions"
|
||||
zplug "olets/zsh-abbr"
|
||||
zplug "sudosubin/zsh-github-cli"
|
||||
zplug "pkulev/zsh-rustup-completion"
|
||||
|
||||
if ! zplug check --verbose; then
|
||||
printf "Install? [y/N]: "
|
||||
if read -q; then
|
||||
echo; zplug install
|
||||
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
|
||||
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
|
||||
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
|
||||
command git clone https://github.com/zdharma/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
|
||||
fi
|
||||
zplug load
|
||||
|
||||
source "$HOME/.zinit/bin/zinit.zsh"
|
||||
autoload -Uz _zinit
|
||||
(( ${+_comps} )) && _comps[zinit]=_zinit
|
||||
|
||||
zinit snippet OMZP::git
|
||||
zinit wait lucid for "zsh-users/zsh-completions"
|
||||
|
||||
# compinit must be ran before fzf-tab, but fzf-tab must be before syntax highlighting etc
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
zinit light "Aloxaf/fzf-tab"
|
||||
|
||||
zinit wait lucid for \
|
||||
"zsh-users/zsh-history-substring-search" \
|
||||
"zdharma/fast-syntax-highlighting" \
|
||||
"zsh-users/zsh-autosuggestions" \
|
||||
"olets/zsh-abbr" \
|
||||
"sudosubin/zsh-github-cli" \
|
||||
"pkulev/zsh-rustup-completion"
|
||||
|
||||
|
||||
# load more stuff
|
||||
source "$ZDOTDIR/fzf-tab.zsh"
|
||||
|
||||
|
||||
eval "$(zoxide init zsh)"
|
||||
|
||||
|
||||
# fzf keybindings
|
||||
[ -f $HOME/.fzf/shell/key-bindings.zsh ] && . $HOME/.fzf/shell/key-bindings.zsh
|
||||
|
||||
|
@ -76,3 +85,4 @@ alias ls="exa --icons"
|
|||
|
||||
# load prompt
|
||||
source "$ZDOTDIR/prompt.zsh"
|
||||
|
||||
|
|
Loading…
Reference in a new issue