zsh: Use zplugin in place of zplug (except fzf) zplugin seems cleaner than zplug, but it doesn't support github releases, so keep zplug around for now, to load fzf
2 files changed, 48 insertions(+), 15 deletions(-)
M zsh/.config/zsh/.zshrc → zsh/.config/zsh/.zshrc
@@ -1,23 +1,10 @@ # -*- mode: sh; -*- source $ZPLUG_HOME/init.zsh +source $HOME/.zplugin/bin/zplugin.zsh -zplug "zsh-users/zsh-completions", depth:1, defer:0 zplug "junegunn/fzf-bin", from:gh-r, as:command, rename-to:fzf zplug "junegunn/fzf", as:plugin, use:"shell/*.zsh" zplug "junegunn/fzf", as:command, use:"bin/*" -zplug "caarlos0/zsh-open-pr", as:plugin -zplug "zdharma/fast-syntax-highlighting", as:plugin, defer:2 -zplug "unixorn/tumult.plugin.zsh", as:plugin, if:"[[ $os -eq darwin ]]" -if [[ -n $commands[nix-env] ]] -then - zplug "spwhitt/nix-zsh-completions", as:plugin - fpath=($fpath $ZPLUG_REPOS/spwhitt/nix-zsh-completions) -fi - -zplug "plugins/yarn", from:oh-my-zsh, if:"[[ -n $commands[yarn] ]]" -zplug "lukechilds/zsh-better-npm-completion", if:"[[ -n $commands[npm] ]]" -zplug "hlissner/zsh-autopair" -zplug "${GOPATH:=$HOME/go}/src/github.com/motemen/ghq/zsh/", from:local, if:"[[ -n $commands[ghq] ]]" HISTSIZE=3000 SAVEHIST=10000@@ -130,9 +117,47 @@ then eval $(ssh-agent) fi -# Then, source plugins and add commands to $PATH +# Plugins + zplug load +zplugin ice blockf +zplugin load "zsh-users/zsh-completions" +zplugin load "hlissner/zsh-autopair" +zplugin load "zdharma/fast-syntax-highlighting" +zplugin load "caarlos0/zsh-open-pr" + + +if [[ $os -eq darwin ]] +then + zplugin load "unixorn/tumult.plugin.zsh" +fi + +if [[ -n $commands[npm] ]] +then + zplugin load "lukechilds/zsh-better-npm-completion" +fi + +if [[ -n $commands[yarn] ]] +then + zplugin snippet "https://github.com/robbyrussell/oh-my-zsh/raw/master/plugins/yarn/yarn.plugin.zsh" +fi + +if [[ -n $commands[nix-env] ]] +then + zplugin load "spwhitt/nix-zsh-completions" +fi + +if [[ -n $commands[ghq] ]] +then + fpath+=("${GOPATH:=$HOME/go}/src/github.com/motemen/ghq/zsh/") +fi + +autoload -Uz compinit +compinit + +zplugin cdreplay -q + # General configuration if [[ -n $commands[hub] ]]@@ -261,3 +286,4 @@ aws elasticbeanstalk describe-environments | grep $(dig +short $1 CNAME) | cut -f10 } unsetopt flow_control # Let me use ^S and ^Q +
A zsh/.config/zsh/setup.sh
@@ -0,0 +1,7 @@ +#!/usr/bin/env zsh + +mkdir $HOME/.zplugin +git clone https://github.com/psprint/zplugin.git $HOME/.zplugin/bin + +zcompile $HOME/.zplugin/bin/zplugin.zsh +