Skip to content

Instantly share code, notes, and snippets.

@felipe-parra
Last active December 2, 2025 03:08
Show Gist options
  • Select an option

  • Save felipe-parra/9eb59c227a5fb2fbc8d1fb4bd6916254 to your computer and use it in GitHub Desktop.

Select an option

Save felipe-parra/9eb59c227a5fb2fbc8d1fb4bd6916254 to your computer and use it in GitHub Desktop.
A custom configuration for your development environment.
# ==============================================================================
#  ZSH CONFIGURATION
# ==============================================================================

# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"

# Set Name of the Theme to load
ZSH_THEME="jbergantine"

# ==============================================================================
#  PLUGINS
# ==============================================================================
# git: Standard git shortcuts and aliases
# node: Node.js specific helpers
# docker: Docker aliases and helpers
# zsh-autosuggestions: Gray ghost text completion
# zsh-syntax-highlighting: MUST BE LAST for proper highlighting
plugins=(
  git
  node
  docker
  zsh-autosuggestions
  zsh-syntax-highlighting
)

source $ZSH/oh-my-zsh.sh

# ==============================================================================
#  USER CONFIGURATION
# ==============================================================================

# Preferred editor for local and remote sessions
export EDITOR='code'

# pnpm Configuration
export PNPM_HOME="$HOME/Library/pnpm"
export PATH="$PNPM_HOME:$PATH"

# ==============================================================================
#  ALIASES
# ==============================================================================

# --- System & Zsh ---
alias zshconfig="code ~/.zshrc"
alias re-zsh="source ~/.zshrc"
alias c="clear"

# --- Git Workflow ---
alias fetch-origin='git fetch origin && git pull'

# --- pnpm Shortcuts ---
# Note: Oh My Zsh doesn't have a built-in pnpm plugin, so we define these manually
alias pi='pnpm install'
alias pa='pnpm add'
alias pad='pnpm add -D'
alias pst='pnpm start'
alias pd='pnpm dev'
alias pb='pnpm build'
alias pr='pnpm run'
alias pt='pnpm test'
alias pu='pnpm update'

# --- Project Maintenance ---
# Fast delete node_modules
alias clean-modules='rm -rf ./node_modules'
# Nuclear option: delete modules + lockfile and reinstall
alias nuke-modules='rm -rf ./node_modules pnpm-lock.yaml && pnpm install'

# ==============================================================================
#  COMPLETIONS
# ==============================================================================

# Initialize completion system (required for pnpm completions)
fpath=(~/.zsh $fpath)
autoload -Uz compinit && compinit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment