dotfiles/home/.config/zsh/03-plugins.zsh

61 lines
1.7 KiB
Bash
Raw Normal View History

# install zinit if it's not already installed
if [ ! -f ~/.zinit/bin/zinit.zsh ]; then
2022-09-26 10:39:26 +03:00
mkdir ~/.zinit
git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin
fi
source ~/.zinit/bin/zinit.zsh
# pure prompt
zinit ice load multisrc'{async,pure}.zsh'
zinit light sindresorhus/pure
2021-11-13 13:07:50 +02:00
# fzf as tab completion
zinit ice lucid
zinit light Aloxaf/fzf-tab
# substring search
zinit ice lucid
zinit light zsh-users/zsh-history-substring-search
2021-11-13 13:07:50 +02:00
# fzf git awesomeness
zinit ice wait'1' lucid atload'source $HOME/.config/zsh/04-aliases.zsh'
zinit light wfxr/forgit
# lots of completions
zinit ice wait'1' lucid as'completion'
zinit light zsh-users/zsh-completions
# swaymsg completions
zinit ice wait'1' lucid as'completion'
zinit snippet https://gist.githubusercontent.com/RPigott/a3efdc08fa4d5fd7df38d091ab5e8532/raw/867ac1884d97d1bd1e5d4037d4eefdf4a004e72b/_swaymsg
# dotdrop completion
zinit ice wait'1' lucid as'completion'
zinit snippet '$DOTREPO/dotdrop/completion/_dotdrop-completion.zsh'
# syntax highlighting
zinit ice lucid atinit'zpcompinit'
zinit light zdharma-continuum/fast-syntax-highlighting
2021-11-13 13:07:50 +02:00
# use fzf with zsh
2022-09-21 00:23:08 +03:00
{%@@ if distro_id == "termux" @@%}
source $PREFIX/share/fzf/key-bindings.zsh
source $PREFIX/share/fzf/completion.zsh
2023-10-30 23:09:55 +02:00
{%@@ elif distro_id == "debian" @@%}
source /usr/share/doc/fzf/examples/key-bindings.zsh
source /usr/share/doc/fzf/examples/completion.zsh
2022-09-21 00:23:08 +03:00
{%@@ else @@%}
source /usr/share/fzf/key-bindings.zsh
source /usr/share/fzf/completion.zsh
2022-09-21 00:24:02 +03:00
{%@@ endif @@%}
{%@@ if distro_id != "termux" @@%}
# enable https://github.com/nvbn/thefuck
2022-09-26 10:39:26 +03:00
eval $(TF_SHELL=zsh thefuck --alias)
{%@@ endif @@%}
2023-09-21 15:39:25 +03:00
# Generate completions at runtime
2023-09-27 10:16:35 +03:00
zinit ice wait'2' lucid
2023-09-21 15:39:25 +03:00
zinit light RobSis/zsh-completion-generator