migrate: stow → chezmoi
- restructure repo to chezmoi conventions (dot_ prefix, private_dot_ssh/) - add nvim config (was untracked) - encrypt restic pass.txt with age - remove stow artifacts (.stow-local-ignore, stow package dirs) - update bootstrap.sh to use chezmoi apply - remove runtime files from tracking (micro buffers, zed backup)
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
# ════════════════════════════════════════════════════════════
|
||||
# Plugins (via Zinit)
|
||||
# ════════════════════════════════════════════════════════════
|
||||
|
||||
# ═══ Powerlevel10k Theme ═══════════════════════════════════
|
||||
# Загружаем ПЕРВЫМ для instant prompt
|
||||
zinit ice depth=1
|
||||
zinit light romkatv/powerlevel10k
|
||||
|
||||
# ═══ Turbo Mode ════════════════════════════════════════════
|
||||
# Плагины загружаются асинхронно для ускорения старта
|
||||
|
||||
# ═══ FZF key-bindings ══════════════════════════════════════
|
||||
# Загружаем ПЕРВЫМ, чтобы виджеты были определены до syntax-highlighting
|
||||
if command -v fzf &>/dev/null; then
|
||||
# Попробовать разные пути установки fzf
|
||||
if [[ -f /usr/share/fzf/key-bindings.zsh ]]; then
|
||||
source /usr/share/fzf/key-bindings.zsh
|
||||
elif [[ -f /usr/share/doc/fzf/examples/key-bindings.zsh ]]; then
|
||||
source /usr/share/doc/fzf/examples/key-bindings.zsh
|
||||
elif [[ -f ~/.fzf.zsh ]]; then
|
||||
source ~/.fzf.zsh
|
||||
fi
|
||||
fi
|
||||
|
||||
# ═══ Автодополнение ════════════════════════════════════════
|
||||
# zsh-completions - дополнительные автодополнения
|
||||
zinit ice wait lucid blockf atpull'zinit creinstall -q .'
|
||||
zinit light zsh-users/zsh-completions
|
||||
|
||||
# ═══ Автопредложения ═══════════════════════════════════════
|
||||
# zsh-autosuggestions - предложения из истории
|
||||
zinit ice wait lucid atload'_zsh_autosuggest_start'
|
||||
zinit light zsh-users/zsh-autosuggestions
|
||||
|
||||
# Настройки autosuggestions
|
||||
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#585b70'
|
||||
export ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||
export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
|
||||
|
||||
# ═══ История ═══════════════════════════════════════════════
|
||||
zinit ice wait"0" lucid atload'
|
||||
# Привязываем стрелки к плагину (теперь они не будут глючить)
|
||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||
|
||||
# Настройка цветов (по желанию)
|
||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="fg=magenta,bold"
|
||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND="fg=red,bold"
|
||||
'
|
||||
zinit light zsh-users/zsh-history-substring-search
|
||||
|
||||
# ═══ FZF ═══════════════════════════════════════════════════
|
||||
# fzf - интерактивный поиск
|
||||
if command -v fzf &>/dev/null; then
|
||||
# fzf-tab - fzf для автодополнения
|
||||
zinit ice wait lucid
|
||||
zinit light Aloxaf/fzf-tab
|
||||
|
||||
# Настройки fzf-tab
|
||||
zstyle ':fzf-tab:*' fzf-command fzf
|
||||
zstyle ':fzf-tab:*' fzf-pad 4
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath 2>/dev/null || ls -1 --color=always $realpath'
|
||||
zstyle ':fzf-tab:complete:*:*' fzf-preview 'less ${(Q)realpath} 2>/dev/null || eza -1 --color=always ${(Q)realpath} 2>/dev/null || ls -1 --color=always ${(Q)realpath}'
|
||||
fi
|
||||
|
||||
# ═══ Навигация ═════════════════════════════════════════════
|
||||
# zoxide - умный cd с историей
|
||||
if command -v zoxide &>/dev/null; then
|
||||
eval "$(zoxide init zsh)"
|
||||
fi
|
||||
|
||||
# ═══ Git ═══════════════════════════════════════════════════
|
||||
# Быстрые git алиасы и функции
|
||||
zinit ice wait lucid
|
||||
zinit snippet OMZ::plugins/git/git.plugin.zsh
|
||||
|
||||
# ═══ Дополнительные инструменты ════════════════════════════
|
||||
# sudo - нажать ESC дважды чтобы добавить sudo
|
||||
zinit ice wait lucid
|
||||
zinit snippet OMZ::plugins/sudo/sudo.plugin.zsh
|
||||
|
||||
# extract - универсальная распаковка архивов
|
||||
zinit ice wait lucid
|
||||
zinit snippet OMZ::plugins/extract/extract.plugin.zsh
|
||||
|
||||
# colored-man-pages - цветные man страницы
|
||||
zinit ice wait lucid
|
||||
zinit snippet OMZ::plugins/colored-man-pages/colored-man-pages.plugin.zsh
|
||||
|
||||
# docker - автодополнение для docker
|
||||
if command -v docker &>/dev/null; then
|
||||
zinit ice wait lucid as'completion'
|
||||
zinit snippet OMZP::docker
|
||||
fi
|
||||
|
||||
# kubectl - автодополнение для kubectl
|
||||
if command -v kubectl &>/dev/null; then
|
||||
zinit ice wait lucid as'completion'
|
||||
zinit snippet OMZ::plugins/kubectl/kubectl.plugin.zsh
|
||||
fi
|
||||
|
||||
# ═══ Подсветка синтаксиса (ПОСЛЕДНИЙ плагин) ═══════════════
|
||||
# zsh-syntax-highlighting - ОБЯЗАТЕЛЬНО загружать последним
|
||||
# Это гарантирует, что все виджеты уже определены
|
||||
zinit ice wait lucid atinit'zpcompinit; zpcdreplay'
|
||||
zinit light zsh-users/zsh-syntax-highlighting
|
||||
Reference in New Issue
Block a user