From 7adeb7c10638618179eabcceb35e2b14ec8239a0 Mon Sep 17 00:00:00 2001 From: Ted Kulp Date: Mon, 23 Jun 2025 14:48:33 -0400 Subject: [PATCH] add .zshrc --- .zshrc | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .zshrc diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..cd785b2 --- /dev/null +++ b/.zshrc @@ -0,0 +1,70 @@ +# **1. Instant Prompt – MUST be first** +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +# 2. Load Zinit +source "${HOME}/.local/share/zinit/zinit.git/zinit.zsh" + +export ZSH_CUSTOM=$HOME/.config/zsh + +# 3. Load Powerlevel10k — do NOT use ice wait or turbo on it +zinit ice depth=1 lucid nocd +zinit light romkatv/powerlevel10k + +# 4. Source your p10k config +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +# 5. Initialize completions early (needed for proper tab completion) +autoload -Uz compinit +compinit + +# 6. Plugins (turbo when possible) +zinit ice wait lucid atload'_zsh_autosuggest_start' +zinit light zsh-users/zsh-autosuggestions + +zinit ice wait lucid blockf +zinit light asdf-vm/asdf + +zinit ice wait lucid blockf +zinit light wintermi/zsh-brew + +zinit ice wait lucid blockf +zinit light atuinsh/atuin + +zinit wait lucid for MichaelAquilina/zsh-autoswitch-virtualenv + +zinit ice wait lucid blockf +zinit light ajeetdsouza/zoxide + +# fzf-tab — defer after other interactive tools +zinit ice wait lucid blockf +zinit light Aloxaf/fzf-tab + + +# direnv — from GitHub releases +zinit from"gh-r" as"program" mv"direnv* -> direnv" \ + atclone'./direnv hook zsh > zhook.zsh' atpull'%atclone' \ + pick"direnv" src="zhook.zsh" for \ + direnv/direnv + +# 7. Syntax highlighting — fast and light +zinit ice wait lucid +zinit light zdharma-continuum/fast-syntax-highlighting + +# 8. Completions (keep blockf, no wait!) +zi for \ + blockf \ + lucid \ + zsh-users/zsh-completions + +# 9. Load all custom configs from $ZSH_CUSTOM +for config_file ("$ZSH_CUSTOM"/*.zsh(N)); do + source "$config_file" +done +unset config_file + +# 10. Custom functions/aliases +function timezsh() { + for i in {1..5}; do /usr/bin/time -p zsh -i -c exit; done +}