summary refs log tree commit diff stats
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.config/zsh/.zshrc56
-rwxr-xr-xzsh/.config/zsh/setup.sh7
2 files changed, 48 insertions, 15 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc
index 52907de9..c8139f1b 100644
--- a/zsh/.config/zsh/.zshrc
+++ b/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 @@ function function eb-active-environment () {
 }
 
 unsetopt flow_control       # Let me use ^S and ^Q
+
diff --git a/zsh/.config/zsh/setup.sh b/zsh/.config/zsh/setup.sh
new file mode 100755
index 00000000..61b54417
--- /dev/null
+++ b/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
+