diff --git a/.gitmodules b/.gitmodules index bf5b90c..ba6e99f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,24 @@ [submodule "zsh-history-substring-search"] path = plugins/zsh-history-substring-search url = https://github.com/zsh-users/zsh-history-substring-search.git + ignore = untracked [submodule "zsh-syntax-highlighting"] path = plugins/zsh-syntax-highlighting url = https://github.com/zsh-users/zsh-syntax-highlighting.git + ignore = untracked [submodule "zsh-autosuggestions"] path = plugins/zsh-autosuggestions url = https://github.com/zsh-users/zsh-autosuggestions.git + ignore = untracked [submodule "zsh-completions"] path = plugins/zsh-completions url = https://github.com/zsh-users/zsh-completions.git + ignore = untracked [submodule "spaceship-prompt"] path = plugins/spaceship-prompt url = https://github.com/spaceship-prompt/spaceship-prompt.git + ignore = untracked +[submodule "fzf-tab"] + path = plugins/fzf-tab + url = https://github.com/Aloxaf/fzf-tab.git + ignore = untracked diff --git a/init.zsh b/init.zsh index 5909c14..b4ad2e7 100644 --- a/init.zsh +++ b/init.zsh @@ -161,6 +161,23 @@ __ZSH_LOCAL_FILE="${ZSH_CONFIG_DIR}/local.zsh" # THE FOLLOWING PLUGINS MUST COME LAST +# FZF Integration +load_plugin fzf-tab +# Disable sort when completing `git checkout` +zstyle ':completion:*:git-checkout:*' sort false +# Set descriptions format to enable group support +zstyle ':completion:*:descriptions' format '[%d]' +# Set list-colors to enable filename colorizing +zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} +# Preview directory's content with exa when completing cd +zstyle ':fzf-tab:complete:cd:*' fzf-preview 'exa -1 --color=always $realpath' +# Remove the '.' prefix at the start of every completion +zstyle ':fzf-tab:*' prefix '' +# Switch groups +zstyle ':fzf-tab:*' switch-group 'ctrl-h' 'ctrl-l' +# Toggle selected for all visible entries +zstyle ':fzf-tab:*' fzf-bindings 'ctrl-a:toggle-all' + # More completions load_plugin zsh-completions diff --git a/plugins/fzf-tab b/plugins/fzf-tab new file mode 160000 index 0000000..938eef7 --- /dev/null +++ b/plugins/fzf-tab @@ -0,0 +1 @@ +Subproject commit 938eef72e93ddb0609205a663bf0783f4e1b5fae