Fancy set of zstyles for completion, looking very nice now :O

This commit is contained in:
Danielle McLean 2016-10-20 17:24:59 +11:00
parent ea227dbae9
commit bb1b81eae6
No known key found for this signature in database
GPG key ID: CC91589719027E94
2 changed files with 38 additions and 1 deletions

View file

@ -0,0 +1,38 @@
#! zsh
# Just show me the completions, *quietly*.
unsetopt list_beep
# If there are no completions, try to correct minor typos in the input.
zstyle :completion:* completer _complete _correct
# Load the nice LS_COLORS into the completion menu too. Pretty!
zstyle :completion:*:default list-colors ${(s.:.)LS_COLORS}
zstyle :completion:*:options list-colors '=^(-- *)=34'
# List the first page, then let me menu through everything.
zmodload zsh/complist # so that listscroll is defined
zstyle :completion:* menu select
zstyle :completion:* list-prompt ' '
zstyle :completion:* select-prompt ' %F{blue}-- %m --%f'
bindkey -M listscroll '^I' 'send-break; self-insert'
# Permit expensive completions to cache info and therefore be usable.
zstyle :completion::complete:* use-cache on
zstyle :completion::complete:* cache-path $XDG_CACHE_HOME/zsh/compcache
# Group completions under cute headings.
zstyle :completion:* format ' %F{yellow}-- %d --%f'
zstyle :completion:*:corrections format ' %F{green}-- %d (errors: %e) --%f'
zstyle :completion:*:warnings format ' %F{red}-- no matches found --%f'
zstyle :completion:* group-name ''
# When listing completions, highlight the first ambiguous character.
zstyle :completion:* show-ambiguity 01\;31
# When listing directories, treat foo//bar as foo/bar, not foo/*/bar.
zstyle :completion:* squeeze-slashes true
# When completing the names of man pages, group them by section.
zstyle :completion:*:manuals separate-sections true
zstyle :completion:*:manuals.* insert-sections true

View file

@ -25,7 +25,6 @@ if [[ ! $LS_COLORS_DIR/LS_COLORS.plugin.zsh -nt $LS_COLORS_DIR/LS_COLORS ]]; the
zplugin compile trapd00r/LS_COLORS
source $LS_COLORS_DIR/LS_COLORS.plugin.zsh
fi
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zplugin $load zsh-users/zsh-completions
zplugin $load zsh-users/zsh-syntax-highlighting