Initial commit

This commit is contained in:
2025-11-04 11:45:38 +01:00
commit 0125833aa1
9 changed files with 563 additions and 0 deletions

27
plugins/completion.zsh Normal file
View File

@@ -0,0 +1,27 @@
# Load completions
autoload -Uz compinit && compinit -d $ZSH_CACHE_DIR/zcompdump
# Smart completion
setopt AUTO_MENU
setopt COMPLETE_IN_WORD
setopt ALWAYS_TO_END
setopt PATH_DIRS
setopt AUTO_PARAM_SLASH
# Completion styling
zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*' use-cache yes
zstyle ':completion:*' cache-path $ZSH_CACHE_DIR
zstyle ':completion:*' special-dirs true
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
# Better directory navigation
zstyle ':completion:*' expand-or-complete-prefix-with-dots
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
# FZF-tab specific settings
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls -1 --color=always $realpath'
zstyle ':fzf-tab:complete:*:*' fzf-preview 'less ${(Q)realpath}'
zstyle ':fzf-tab:*' switch-group ',' '.'