2020-01-19 01:36:21 +02:00
|
|
|
# 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
|
2019-10-26 20:05:31 +03:00
|
|
|
fi
|
|
|
|
|
2020-01-19 01:36:21 +02:00
|
|
|
source ~/.zinit/bin/zinit.zsh
|
2019-10-26 20:05:31 +03:00
|
|
|
|
|
|
|
# pure prompt
|
2020-01-19 01:36:21 +02:00
|
|
|
zinit ice load multisrc'{async,pure}.zsh'
|
|
|
|
zinit light sindresorhus/pure
|
2019-10-26 20:05:31 +03:00
|
|
|
|
2021-11-13 13:07:50 +02:00
|
|
|
# fzf as tab completion
|
2020-01-19 01:36:21 +02:00
|
|
|
zinit ice lucid
|
|
|
|
zinit light Aloxaf/fzf-tab
|
2019-10-26 20:05:31 +03:00
|
|
|
|
2020-01-04 11:34:51 +02:00
|
|
|
# substring search
|
2020-01-19 01:36:21 +02:00
|
|
|
zinit ice lucid
|
|
|
|
zinit light zsh-users/zsh-history-substring-search
|
2019-10-26 20:05:31 +03:00
|
|
|
|
2021-11-13 13:07:50 +02:00
|
|
|
# fzf git awesomeness
|
2022-09-03 14:15:05 +03:00
|
|
|
zinit ice wait'1' lucid atload'source $HOME/.config/zsh/04-aliases.zsh'
|
2020-01-19 01:36:21 +02:00
|
|
|
zinit light wfxr/forgit
|
2019-10-26 20:05:31 +03:00
|
|
|
|
2019-11-06 11:20:20 +02:00
|
|
|
# lots of completions
|
2020-01-19 01:36:21 +02:00
|
|
|
zinit ice wait'1' lucid as'completion'
|
|
|
|
zinit light zsh-users/zsh-completions
|
2019-11-06 11:20:20 +02:00
|
|
|
|
2019-12-12 14:50:50 +02:00
|
|
|
# swaymsg completions
|
2020-01-19 01:36:21 +02:00
|
|
|
zinit ice wait'1' lucid as'completion'
|
|
|
|
zinit snippet https://gist.githubusercontent.com/RPigott/a3efdc08fa4d5fd7df38d091ab5e8532/raw/867ac1884d97d1bd1e5d4037d4eefdf4a004e72b/_swaymsg
|
2019-12-12 14:50:50 +02:00
|
|
|
|
2019-10-26 20:05:31 +03:00
|
|
|
# dotdrop completion
|
2020-01-19 01:36:21 +02:00
|
|
|
zinit ice wait'1' lucid as'completion'
|
|
|
|
zinit snippet '$DOTREPO/dotdrop/completion/_dotdrop-completion.zsh'
|
2019-10-26 20:05:31 +03:00
|
|
|
|
|
|
|
# syntax highlighting
|
2020-01-19 01:36:21 +02:00
|
|
|
zinit ice lucid atinit'zpcompinit'
|
2021-11-02 10:20:08 +02:00
|
|
|
zinit light zdharma-continuum/fast-syntax-highlighting
|
2019-10-26 20:05:31 +03:00
|
|
|
|
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 @@%}
|
2022-08-17 21:37:52 +03:00
|
|
|
source /usr/share/fzf/key-bindings.zsh
|
|
|
|
source /usr/share/fzf/completion.zsh
|
2022-09-21 00:24:02 +03:00
|
|
|
{%@@ endif @@%}
|
2022-09-20 23:03:42 +03:00
|
|
|
|
2023-05-09 08:58:21 +03:00
|
|
|
{%@@ if distro_id != "termux" @@%}
|
2022-09-20 23:03:42 +03:00
|
|
|
# enable https://github.com/nvbn/thefuck
|
2022-09-26 10:39:26 +03:00
|
|
|
eval $(TF_SHELL=zsh thefuck --alias)
|
2023-05-09 08:58:21 +03:00
|
|
|
{%@@ 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
|