zsh: Reorder zshrc components and move stuff

Put the external plugins to the end as well as z-sy-h to the end of the
plugins.
Put the last remaining lines in the zshrc in their own modules.
This commit is contained in:
2020-11-15 01:16:00 +01:00
parent 97ab5d64a6
commit af49c39ba3
12 changed files with 13 additions and 19 deletions

View File

@@ -8,8 +8,6 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
ZSH_CONF="$ZDOTDIR/plugins"
# https://github.com/romkatv/dotfiles-public/blob/7e49fc4fb71d/.zshrc#L35
comp-conf() {
emulate -L zsh
@@ -41,20 +39,3 @@ folder-source() {
}
folder-source "$ZDOTDIR"/zshrc.d
autoload -U select-word-style && select-word-style bash
## Load external config files and modules
autoload edit-command-line; zle -N edit-command-line
(( ! $+aliases[run-help] )) || unalias run-help
autoload -Uz run-help run-help-git zmv
if [[ -d "$ZDOTDIR/autoload" ]]; then
fpath=("$ZDOTDIR/autoload" $fpath)
autoload -Uz -- "" "${fpath[1]}"/[^_.]*(.xN:t)
fi
! command -v direnv &>/dev/null || eval "$(direnv hook zsh)"
# Reenable fzf-tab since `bindkey -v` seems to deactivate it
enable-fzf-tab
## Setup zle
zle_highlight=('paste:none')

View File

@@ -0,0 +1,12 @@
autoload -U select-word-style && select-word-style bash
autoload edit-command-line; zle -N edit-command-line
(( ! $+aliases[run-help] )) || unalias run-help
autoload -Uz run-help run-help-git zmv
# Load autoloadable functions
if [[ -d "$ZDOTDIR/autoload" ]]; then
fpath=("$ZDOTDIR/autoload" $fpath)
autoload -Uz -- "" "${fpath[1]}"/[^_.]*(.xN:t)
fi

View File

@@ -0,0 +1 @@
! command -v direnv &>/dev/null || eval "$(direnv hook zsh)"