zsh completion plugin

This commit is contained in:
thek4n 2024-12-12 20:44:48 +03:00
parent 7ad907b609
commit a1e01875de
4 changed files with 11 additions and 12 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@ home/user/.config/zsh/zshrc.d/*
!home/user/.config/zsh/zshrc.d/00_zhashd.sh !home/user/.config/zsh/zshrc.d/00_zhashd.sh
home/user/.config/zsh/.zcalc_history home/user/.config/zsh/.zcalc_history
.zcompdump
*.zwc *.zwc
home/user/.ssh/* home/user/.ssh/*

View File

@ -1,12 +1,10 @@
# enable completion features # enable completion features
fpath=(~/.zfunc $fpath) fpath=(~/.zfunc $fpath)
zmodload zsh/complist zmodload zsh/complist
autoload -Uz compinit
compinit -d ~/.cache/zsh/.zcompdump
zstyle ':completion:*' use-cache on zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path "${HOME}/.cache/zsh/.zcompcache" zstyle ':completion:*' cache-path "${HOME}/.cache/zsh/.zcompcache"
zstyle ':completion:*' menu yes select zstyle ':completion:*' menu select
zstyle ':completion:*' auto-description 'specify: %d' zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' format 'Completing %d' zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name '' zstyle ':completion:*' group-name ''
@ -35,6 +33,9 @@ zstyle ':completion:*:cd:*' ignore-parents parent pwd
zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f' zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f'
zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f'
zstyle ':autocomplete:*' min-input 3
zstyle ':autocomplete:*' delay 0.3
bindkey -M menuselect '^h' vi-backward-char bindkey -M menuselect '^h' vi-backward-char
bindkey -M menuselect '^k' vi-up-line-or-history bindkey -M menuselect '^k' vi-up-line-or-history
@ -44,8 +45,3 @@ bindkey -M menuselect '^e' undo
bindkey -M menuselect '^[' cancel bindkey -M menuselect '^[' cancel
bindkey -M menuselect '^M' check-command bindkey -M menuselect '^M' check-command
bindkey -M menuselect '^I' accept-and-infer-next-history bindkey -M menuselect '^I' accept-and-infer-next-history
compdef _directories _d
compdef _files _f
compdef _directories mcd

View File

@ -13,8 +13,10 @@ install_if_not_exists zsh-users/zsh-autosuggestions
install_if_not_exists zsh-users/zsh-syntax-highlighting install_if_not_exists zsh-users/zsh-syntax-highlighting
install_if_not_exists hlissner/zsh-autopair install_if_not_exists hlissner/zsh-autopair
install_if_not_exists unixorn/fzf-zsh-plugin install_if_not_exists unixorn/fzf-zsh-plugin
install_if_not_exists marlonrichert/zsh-autocomplete
_so "${HOME}/.config/zsh/plugins/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" _so "${HOME}/.config/zsh/plugins/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
_so "${HOME}/.config/zsh/plugins/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh" _so "${HOME}/.config/zsh/plugins/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh"
_so "${HOME}/.config/zsh/plugins/hlissner/zsh-autopair/autopair.zsh" _so "${HOME}/.config/zsh/plugins/hlissner/zsh-autopair/autopair.zsh"
_so "${HOME}/.config/zsh/plugins/unixorn/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh" _so "${HOME}/.config/zsh/plugins/unixorn/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh"
_so "${HOME}/.config/zsh/plugins/marlonrichert/zsh-autocomplete/zsh-autocomplete.plugin.zsh"

View File

@ -8,6 +8,6 @@ zfiles+=($(find "${ZDOTDIR}/" -maxdepth 1 -type f -not -name '*.zwc'))
for zfile in "${zfiles[@]}" for zfile in "${zfiles[@]}"
do do
echo zcompile "${zfile}" echo "zcompile ${zfile}"
zcompile "${zfile}" zcompile "${zfile}"
done done