Remove zsh plugin manager

Plugins are managed directly through pacman packages now. Since I am
only using six zsh plugins and they are staying relatively constant and
not changing much, pacman seems a much more sane way to manage them
without cluttering up my zsh initialization routine. All zgen management
can go and just needs 6 `source` lines in order to load the plugin
entrypoints.
This commit is contained in:
Marty Oehme 2020-02-08 16:28:36 +01:00
parent 370c155ca4
commit 40b6d2220c
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A
3 changed files with 22 additions and 77 deletions

View file

@ -10,7 +10,6 @@ dialog
docker
dunst
exa
fakeroot
fasd
feh
flashfocus-git
@ -70,9 +69,10 @@ psmisc
pulseaudio-alsa
pulsemixer
python-pdfminer.six
python-pip
python-pipx
python-pybtex
python-pynvim
python-ueberzug
qutebrowser
redshift
ripgrep-all
@ -123,3 +123,13 @@ yarn
yay
youtube-dl
zathura-pdf-mupdf
pacman-contrib
# zsh plugins
oh-my-zsh-git
alias-tips-git
zsh-autosuggestions
zsh-completions-git
zsh-fast-syntax-highlighting-git
zsh-theme-powerlevel10k-git
nvm

View file

@ -11,9 +11,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
# load all plugins
[ -f "$ZSHCONFDIR/plugins.zsh" ] && source "$ZSHCONFDIR/plugins.zsh"
# Set completion style
# The following lines were added by compinstall
zstyle ':completion:*' completer _complete _ignored _approximate
@ -23,6 +20,16 @@ zstyle ':completion:*' menu select=1
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle :compinstall filename "$ZSHCONFDIR/.zshrc"
# End of lines added by compinstall
# load plugins
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
source /usr/share/zsh/plugins/alias-tips/alias-tips.plugin.zsh
source /usr/share/oh-my-zsh/plugins/colored-man-pages/colored-man-pages.plugin.zsh
source /usr/share/oh-my-zsh/plugins/command-not-found/command-not-found.plugin.zsh
source /usr/share/nvm/init-nvm.sh
autoload -Uz compinit zmv
compinit

View file

@ -1,72 +0,0 @@
#!/bin/zsh
# Clone zgen if you haven't already
check_zgen_installation() {
if [[ -z "$ZGEN_PARENT_DIR" ]]; then
ZGEN_PARENT_DIR=${XDG_DATA_HOME:="$HOME/.local/share"}
ZGEN_DIR="$ZGEN_PARENT_DIR/zgen"
fi
if [[ ! -f $ZGEN_DIR/zgen.zsh ]]; then
if [[ ! -d "$ZGEN_PARENT_DIR" ]]; then
mkdir -p "$ZGEN_PARENT_DIR"
fi
cd "$ZGEN_PARENT_DIR" || return
git clone https://github.com/tarjoilija/zgen.git "$ZGEN_DIR"
fi
# shellcheck source=/home/marty/.config/zgen/zgen.zsh
# shellcheck disable=SC1091
source "$ZGEN_DIR"/zgen.zsh
unset ZGEN_PARENT_DIR
}
load_plugins() {
ZGEN_LOADED=()
ZGEN_COMPLETIONS=()
zgen oh-my-zsh
# If you want to customize your plugin list, create a file named
# .zgen-local-plugins in your home directory. That file will be sourced
# during startup *instead* of running this load-starter-plugin-list function,
# so make sure to include everything from this function that you want to keep.
# If zsh-syntax-highlighting is bundled after zsh-history-substring-search,
# they break, so get the order right.
zgen load zdharma/fast-syntax-highlighting
# zgen load zsh-users/zsh-history-substring-search
# # Set keystrokes for substring searching
# zmodload zsh/terminfo
# bindkey "${terminfo[kcuu1]:?}" history-substring-search-up
# bindkey "${terminfo[kcud1]:?}" history-substring-search-down
# Automatically run zgen update and zgen selfupdate every 7 days.
zgen load unixorn/autoupdate-zgen
# Warn you when you run a command that you've set an alias for without
# using the alias.
zgen load djui/alias-tips
# Add Fish-like autosuggestions to your ZSH.
zgen load zsh-users/zsh-autosuggestions
zgen load romkatv/powerlevel10k powerlevel10k
# radically enhanced cd command, all sorts of options
# zgen load b4b4r07/enhancd
# set up nvm, the npm version manager
zgen load lukechilds/zsh-nvm
zgen oh-my-zsh plugins/colored-man-pages
zgen load zsh-users/zsh-completions
# Load me last
GENCOMPL_FPATH=${XDG_CONFIG_HOME:-"$HOME/.config/zsh"}/complete
zgen save
}
check_zgen_installation
if ! zgen saved; then
load_plugins
fi