change name to zplugins

This commit is contained in:
Daylin Morgan 2023-05-08 10:46:40 -05:00
parent dbe8e6b2e2
commit ba008cd8d0
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
2 changed files with 6 additions and 30 deletions

View file

@ -1,27 +1,11 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
#
# .zshrc - Zsh file loaded on interactive shell sessions.
#
#
# Profiling
#
# Load zprof first if we need to profile. # Load zprof first if we need to profile.
[[ ${ZPROFRC:-0} -eq 0 ]] || zmodload zsh/zprof [[ ${ZPROFRC:-0} -eq 0 ]] || zmodload zsh/zprof
alias zprofrc="ZPROFRC=1 zsh" alias zprofrc="ZPROFRC=1 zsh"
#
# Options
#
# Set general Zsh options needed for config.
setopt extended_glob setopt extended_glob
#
# Lazy-load functions
#
# Autoload functions directory and its subdirs. # Autoload functions directory and its subdirs.
for funcdir in $ZDOTDIR/functions $ZDOTDIR/functions/*(N/); do for funcdir in $ZDOTDIR/functions $ZDOTDIR/functions/*(N/); do
fpath=($funcdir $fpath) fpath=($funcdir $fpath)
@ -29,33 +13,25 @@ for funcdir in $ZDOTDIR/functions $ZDOTDIR/functions/*(N/); do
done done
unset funcdir unset funcdir
#
# Pre-antidote
#
# Be sure to set any supplemental completions directories before compinit is run. # Be sure to set any supplemental completions directories before compinit is run.
fpath=(${ZDOTDIR}/completions(-/FN) $fpath) fpath=(${ZDOTDIR}/completions(-/FN) $fpath)
#
# antidote
#
[[ -d ${ZDOTDIR:-~}/.antidote ]] || [[ -d ${ZDOTDIR:-~}/.antidote ]] ||
git clone https://github.com/mattmc3/antidote ${ZDOTDIR:-~}/.antidote git clone https://github.com/mattmc3/antidote ${ZDOTDIR:-~}/.antidote
# Set the name of the static .zsh plugins file antidote will generate. # Set the name of the static .zsh plugins file antidote will generate.
zsh_plugins=${ZDOTDIR:-~}/.zsh_plugins.zsh zsh_plugins=${ZDOTDIR:-~}/.zplugins.zsh
# Ensure you have a .zsh_plugins.txt file where you can add plugins. # Ensure you have a .zplugins file where you can add plugins.
[[ -f ${zsh_plugins:r}.txt ]] || touch ${zsh_plugins:r}.txt [[ -f ${zsh_plugins:r} ]] || touch ${zsh_plugins:r}
# Lazy-load antidote. # Lazy-load antidote.
fpath+=(${ZDOTDIR:-~}/.antidote/functions) fpath+=(${ZDOTDIR:-~}/.antidote/functions)
autoload -Uz $fpath[-1]/antidote autoload -Uz $fpath[-1]/antidote
# Generate static file in a subshell when .zsh_plugins.txt is updated. # Generate static file in a subshell when .zplugins is updated.
if [[ ! $zsh_plugins -nt ${zsh_plugins:r}.txt ]]; then if [[ ! $zsh_plugins -nt ${zsh_plugins:r} ]]; then
(antidote bundle <${zsh_plugins:r}.txt >|$zsh_plugins) (antidote bundle <${zsh_plugins:r} >|$zsh_plugins)
fi fi
# Source your static plugins file. # Source your static plugins file.