A high-performance Emacs 30.1 configuration with 80+ packages, native compilation, Tree-sitter support, and AI integration for modern software development.
# Clone configuration
git clone https://github.com/<your-username>/.emacs.d.git ~/.emacs.d
# Set required environment variables
export OPENAI_API_KEY="sk-..." # For ChatGPT Shell
# Install required tools (macOS)
brew install ripgrep gcc libgccjit cmake
# Launch Emacs - packages auto-install on first run
emacsA meticulously optimized Emacs configuration leveraging Emacs 30.1's cutting-edge features:
early-init.el(68 lines): Startup optimizations, GC tuning, native compilation setupinit.el(1050+ lines): Main configuration with 85+ packages in 12 logical sectionscustom.el: Auto-generated customizations and theme settingssite-lisp/utilities/: 14 custom utility functions for enhanced productivity
- Dual system:
use-packagewith ELPA (primary) +straight.elfor development packages - Smart loading: All packages use deferred loading for optimal startup time
- Auto-installation: Missing packages install automatically on first launch
- Performance first: Optimize GC with GCMH, disable unwanted defaults, leverage native compilation with dedicated cache.
- Builtβin over external: Prefer Emacs 30's built-in features (Tab Bar, Treeβsitter, Eglot, Project.el, Pixel Scrolling).
- Modularity: Group related settings and packages logically; keep custom files separate (
custom.el). - Environmentβdriven secrets: Read sensitive keys (e.g.
OPENAI_API_KEY) from environment variables, not hardβcoded. - Minimal boilerplate: Use sensible defaults and rely on community packages for specialized workflows.
- Vertico + Orderless + Marginalia: Modern minibuffer completion
- Corfu + Cape: In-buffer auto-completion with multiple backends
- Embark + Consult: Context actions and advanced search
- Savehist + Recentf: Persistent history and recent files
- Eglot: Built-in LSP client optimized for Emacs 30.1
- Tree-sitter: Native syntax highlighting for 17 languages
- Magit: Best-in-class Git interface with fullscreen mode
- Flycheck: Real-time syntax checking with custom linters
- VTerm: Full terminal emulator with smart toggle
- ChatGPT Shell: OpenAI GPT integration
- GitHub Copilot: AI pair programming
- Claude Shell: Claude API integration
- Custom Context Function: Smart project context for Claude Code
- Treemacs: File explorer with Nerd Icons theme
- Projectile + Project.el: Dual project management
- Deadgrep: Lightning-fast ripgrep interface
- Ace-window + Winum: Efficient window navigation
- Doom Themes + Doom Modeline: Modern, beautiful interface
- Solaire Mode: Visual buffer distinction
- Nerd Icons: Comprehensive icon support
- Ligatures: Programming font ligatures
- Pixel Scrolling: Smooth scrolling with momentum
- Expand-region: Smart selection expansion
- Multiple cursors: Multi-cursor editing
- Undo-fu: Enhanced undo/redo
- Comment-dwim-2: Intelligent commenting
- Rainbow-delimiters: Colorized parentheses matching
- Custom utilities: Move lines, duplicate, smart navigation
- ESUP: Startup profiler for optimization
- Helpful: Enhanced help buffers with better documentation
- Lazy loading: Deferred package loading for <1s startup
- Native Compilation: JIT with comp-speed 3, 8 async jobs, dedicated cache
- Startup Time: <1s with deferred loading and optimized GC
- Tree-sitter: 17 languages with auto-installation and retry logic
- Eglot: Optimized with ignored capabilities for better performance
- Process Performance: 4MB read buffers for LSP and external processes
- Long Line Handling: Optimized for files with extremely long lines
- Image Rendering: Auto-scaling for better visual display
- Lazy Highlighting: Deferred completion highlighting
- Pixel Scrolling: Momentum with 0.75 interpolation factor
- Enhanced Completions: Historical sorting with category overrides
- Tab Bar: Native tabs with Command key bindings
- Repeat Mode: Streamlined command repetition
-
Clone this repo into your Emacs configuration directory:
git clone https://github.com/<your-username>/.emacs.d.git ~/.emacs.d
-
Set up environment variables (e.g. for ChatGPT Shell):
export OPENAI_API_KEY="sk-..."
-
Launch Emacs. On first run,
use-packagewill install missing packages automatically.
- Emacs 30.1 or later (30.0.91+ for most features)
- Git: For version control and Tree-sitter grammar installation
- ripgrep: For deadgrep and consult-ripgrep functionality
# Required for native compilation
brew install gcc libgccjit
# Required for VTerm
brew install cmake
# Optional language servers
brew install gopls # Go
npm install -g typescript-language-server # TypeScript/JavaScript
pip install cfn-lint # CloudFormationTree-sitter and LSP support for:
- Go, Python, JavaScript/TypeScript, Rust
- C/C++, Java, YAML, JSON
- HTML/CSS, Markdown, Dockerfile
- Bash/Shell, TOML, XML, Make
- All custom settings are in
init.el. Separatecustom.elholds UI customization. early-init.eloptimizes startup and configures native compilation.- To override or add settings:
- Edit
init.eland add youruse-packagedeclarations. - Restart Emacs or evaluate your buffer.
- Edit
| Key | Function |
|---|---|
s-c / s-x / s-v / s-a |
Copy / Cut / Paste / Select All |
s-z / s-Z |
Undo / Redo |
s-{ / s-} |
Previous / Next Tab |
s-t / s-w |
New Tab / Close Tab |
s-/ |
Comment (smart) |
s-\\ |
Toggle Treemacs |
| Key | Function |
|---|---|
C-c l a |
LSP Code Actions |
C-c l r |
LSP Rename |
C-c l f |
LSP Format |
C-c l d |
LSP Documentation |
F5 |
Magit Status |
F6 |
Magit Blame |
C-\\ or C-`` |
Toggle Terminal |
F7 |
Deadgrep Search |
| Key | Function |
|---|---|
C-M-n / C-M-p |
Next / Previous Function |
C-a |
Smart Beginning of Line |
C-@ |
Expand Region |
M-up / M-down |
Move Line Up / Down |
C-c d |
Duplicate Line/Region |
C-x C-y |
Browse Kill Ring |
| Key | Function |
|---|---|
C-c C-k |
Claude Code with Context |
C-c g s |
ChatGPT Shell |
C-c g d |
ChatGPT Describe Code |
| Key | Function |
|---|---|
M-0 |
Focus Treemacs |
C-x t t |
Toggle Treemacs |
C-x 1 |
Ace Window (smart) |
- To change your theme, edit the
doom-themessection ininit.el. - To add new packages, declare them with
use-packageand customize via:config,:init,:bind. - For keybindings, use
bind-keys*from theuse-packagesuite. - If you want a different Org or Python setup, add your hooks after the built-in declarations.
| Problem | Solution |
|---|---|
| Slow startup | Run M-x esup for detailed profiling or M-x emacs-init-time |
| Package not installing | Delete ~/.emacs.d/elpa/ and restart |
| Native compilation warnings | Check *Warnings* buffer, delete eln-cache/ |
| LSP not working | Ensure language server is installed and in PATH |
| Tree-sitter error | Auto-retry enabled, or run M-x treesit-install-language-grammar |
| Icons missing | Run M-x nerd-icons-install-fonts |
| Help not enhanced | Run M-x package-install RET helpful RET |
# Complete reset (keeps your config files)
rm -rf ~/.emacs.d/elpa ~/.emacs.d/straight ~/.emacs.d/eln-cache
# Debug startup issues
emacs --debug-init- CLAUDE.md: Comprehensive guide for Claude Code AI assistant
- GEMINI.md: Guide for Gemini-based AI tools
- Custom utilities: See
site-lisp/utilities/utilities.elfor helper functions
This is a personal configuration, but contributions are welcome:
- Bug reports: Open an issue with Emacs version and error messages
- Feature requests: Suggest improvements via issues
- Pull requests: Documentation improvements and bug fixes appreciated
- Fork and clone the repository
- Test changes with
emacs -Q -l init.el - Update both README.md and CLAUDE.md for significant changes
- Use semantic commit messages (
feat:,fix:,docs:)
- Performance: Startup time reduced from ~2s to <1s with lazy loading
- Stability: Removed conflicting packages (popwin, use-package-chords)
- Enhanced packages: Better Corfu, Eglot, and Magit configurations
- New features: Added Helpful, Rainbow-delimiters, and ESUP
- Bug fixes: Fixed vterm font issues and tree-sitter installation
- Modern Emacs 30.1: Added long-line optimizations and lazy highlighting
MIT License - Feel free to use and modify for your own configuration.
Enjoy a blazing-fast, modern Emacs experience! π
For questions or support, open an issue on GitHub.