Skip to content

Instantly share code, notes, and snippets.

@scaryrawr
Created February 3, 2026 13:57
Show Gist options
  • Select an option

  • Save scaryrawr/be464acd4e59bf8ceee26405f6d8cc22 to your computer and use it in GitHub Desktop.

Select an option

Save scaryrawr/be464acd4e59bf8ceee26405f6d8cc22 to your computer and use it in GitHub Desktop.
zsh setup
# =============================================================================
# Prompt
# =============================================================================
romkatv/powerlevel10k kind:fpath
scaryrawr/p10k-ext kind:defer
# =============================================================================
# Completions (fpath - loaded early for compinit)
# =============================================================================
zsh-users/zsh-completions kind:fpath path:src
scaryrawr/copilot.zsh kind:fpath
scaryrawr/devedge.zsh kind:fpath path:functions
ziglang/shell-completions kind:defer
# =============================================================================
# Oh-My-Zsh Framework & Plugins
# =============================================================================
getantidote/use-omz
# Cloud & DevOps
ohmyzsh/ohmyzsh path:plugins/azure kind:defer
ohmyzsh/ohmyzsh path:plugins/docker kind:defer
ohmyzsh/ohmyzsh path:plugins/docker-compose kind:defer
# Languages & Package Managers
ohmyzsh/ohmyzsh path:plugins/bun kind:defer
ohmyzsh/ohmyzsh path:plugins/fnm kind:defer
ohmyzsh/ohmyzsh path:plugins/golang kind:defer
ohmyzsh/ohmyzsh path:plugins/rust kind:defer
ohmyzsh/ohmyzsh path:plugins/yarn kind:defer
# Utilities
ohmyzsh/ohmyzsh path:plugins/cp kind:defer
ohmyzsh/ohmyzsh path:plugins/encode64 kind:defer
ohmyzsh/ohmyzsh path:plugins/eza kind:defer
ohmyzsh/ohmyzsh path:plugins/gh kind:defer
ohmyzsh/ohmyzsh path:plugins/zoxide kind:defer
# =============================================================================
# Shell Enhancements (Fish-like experience)
# =============================================================================
mattmc3/zfunctions
zsh-users/zsh-autosuggestions kind:defer
zsh-users/zsh-history-substring-search kind:defer
zdharma-continuum/fast-syntax-highlighting kind:defer
scaryrawr/fzf.zsh kind:defer
marlonrichert/zsh-autocomplete
# =============================================================================
# Tools & Benchmarking
# =============================================================================
romkatv/zsh-bench kind:defer
scaryrawr/devedge.zsh kind:defer
. "$HOME/.cargo/env"
# Cache brew shellenv (avoid subprocess on every shell startup)
export HOMEBREW_PREFIX="/opt/homebrew"
export HOMEBREW_CELLAR="/opt/homebrew/Cellar"
export HOMEBREW_REPOSITORY="/opt/homebrew"
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.bun/bin:$HOME/.lmstudio/bin:/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}"
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:"
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}"
export FPATH="$HOMEBREW_PREFIX/share/zsh/site-functions:${FPATH}"
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
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
export EDITOR=nvim
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
# Fish-like autosuggestion appearance (dimmed gray)
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8'
# Accept suggestion with right arrow (fish default) - partial word with forward-word
bindkey '^[[C' forward-char # Right arrow accepts one char
bindkey '^[f' forward-word # Alt+F accepts one word (fish-like)
# Case-insensitive and fuzzy matching
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
# Fish-like tab completion: insert common prefix instead of first match
zstyle ':autocomplete:*' insert-unambiguous yes
zstyle ':autocomplete:*' widget-style menu-select
zstyle ':autocomplete:*' fzf-completion yes
# Group completions by type with descriptions (like fish)
zstyle ':completion:*' group-name ''
zstyle ':completion:*:descriptions' format '%F{yellow}-- %d --%f'
zstyle ':completion:*:messages' format '%F{purple}-- %d --%f'
zstyle ':completion:*:warnings' format '%F{red}-- no matches found --%f'
# Colorize completions using LS_COLORS
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
ZFUNCDIR=$HOME/.config/zsh/functions
zstyle ':omz:plugins:eza' 'icons' yes
zstyle ':omz:plugins:eza' 'git-status' yes
zstyle ':omz:plugins:eza' 'hyperlink' yes
antidote_locations=("$HOMEBREW_PREFIX/share/antidote" "$HOME/.antidote")
if ! (( $+functions[antidote] )); then
for antidote_dir in "${antidote_locations[@]}"; do
if [[ -f "$antidote_dir/antidote.zsh" ]]; then
source "$antidote_dir/antidote.zsh"
break
fi
done
if ! (( $+functions[antidote] )); then
git clone --depth=1 https://github.com/mattmc3/antidote.git "$HOME/.antidote"
source "$HOME/.antidote/antidote.zsh"
fi
fi
antidote load
autoload -Uz promptinit && promptinit && prompt powerlevel10k
# fnm
(( $+commands[fnm] )) && eval "$(fnm env --use-on-cd --shell zsh)"
# Lazy-load gum completions
if (( $+commands[gum] )); then
_gum_completion() {
unfunction _gum_completion
eval "$(gum completion zsh)"
_gum "$@"
}
compdef _gum_completion gum
fi
if (( $+commands[codex] )); then
_codex_completion() {
unfunction _codex_completion
eval "$(codex completion zsh)"
_codex "$@"
}
compdef _codex_completion codex
fi
alias l='ls -lah'
if (( $+commands[nvim] )); then
alias vim='nvim'
alias vi='nvim'
fi
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
export VCPKG_ROOT="$HOME/.local/share/vcpkg"
if [[ $- == *i* ]]; then
stty -ixon < /dev/tty
fi
# Added by LM Studio CLI (lms)
export PATH="$PATH:/Users/mike/.lmstudio/bin"
# End of LM Studio CLI section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment