Gilbert's Emacs Configuration
A modern, feature-rich Emacs configuration focused on productivity, development workflow, and an enhanced editing experience. This configuration uses straight.el for package management and is organized into modular components for easy maintenance.
โจ Features
๐จ Theme & UI
- Doom Themes - Beautiful color schemes (default: doom-monokai-classic)
- All-the-icons - Icon set for various UI elements
- Doom Modeline - Fancy and informative modeline
- Transparency support - Adjustable frame transparency
- Custom fonts - JetBrains Mono with CJK support
๐ง Core Editor Features
- Evil Mode - Vim-like editing with Evil Collection
- Which-key - Interactive keybinding discovery
- General - Unified keybinding system with leader keys
- Vertico - Modern vertical completion UI
- Corfu - Auto-completion framework
- Orderless - Advanced completion filtering
- Marginalia - Annotations for completion candidates
๐ง AI Integration
-
GPTel - AI chat integration with multiple providers
-
MCP (Model Context Protocol) - Advanced AI tool integration
-
Claude Code IDE - Direct Claude AI integration
-
Minuet - AI-powered code completion
-
Aidermacs - AI-assisted coding
-
Supported AI Providers:
- OpenAI (GPT-4.1-mini)
- OpenRouter
- Google Gemini
- DeepSeek
- Context7
- Brave Search
๐ Knowledge Management
- Org Mode - Powerful note-taking and organization
- Org-roam - Zettelkasten-style note linking
- Deft - Quick note browsing and searching
- Treemacs - File tree sidebar with project management
๐ป Development Tools
Language Support
- LSP - Language Server Protocol with Eglot
- Tree-sitter - Advanced syntax highlighting
- Multi-language modes - Go, Python, Rust, JavaScript, TypeScript, Web, Haskell, Erlang, Elixir, Elisp, Shell, Docker, Configuration files
Version Control
- Magit - Complete Git interface
- Git-timemachine - Browse file history
- Git-gutter - See changes in the gutter
Additional Tools
- Docker - Container management integration
- Projectile - Project management
- YASnippet - Template system
- Flycheck - On-the-fly syntax checking
๐ Enhancements
- EditorConfig - Per-project configuration
- Rainbow delimiters - Color-coded brackets
- Ligatures - Programming symbol prettification
- Iedit - Multiple cursors editing
- Page-break-lines - Visual page breaks
๐ Installation
Prerequisites
- Emacs 29.1 or later
- Git
- 1Password CLI (for AI API keys)
Quick Start
-
Backup your existing configuration:
mv ~/.emacs.d ~/.emacs.d.backup
-
Clone this repository:
git clone https://github.com/gilbertwong96/.emacs.d.git ~/.emacs.d -
Launch Emacs:
emacs
The configuration will automatically:
- Install straight.el package manager
- Download and configure all packages
- Set up the theme and UI
1Password Setup (Optional)
For AI integration, store your API keys in 1Password with these paths:
op://AI/OpenRouter-Gemini/credentialop://AI/Google AI Studio API/credentialop://AI/deepseek-api-key/passwordop://AI/OpenAI/credentialop://AI/Context7/credentialop://AI/BraveAPI/credential
๐ Configuration Structure
~/.emacs.d/
โโโ init.el # Main configuration file
โโโ elisp/ # Modular configuration files
โ โโโ init-theme.el # Theme and appearance
โ โโโ init-settings.el # Basic Emacs settings
โ โโโ init-keybindings.el # Keybinding configuration
โ โโโ init-evil.el # Vim emulation
โ โโโ init-autocomplete.el # Completion system
โ โโโ init-vertico.el # Vertical completion UI
โ โโโ init-org.el # Org mode configuration
โ โโโ init-ai.el # AI tools integration
โ โโโ init-lsp.el # Language Server Protocol
โ โโโ init-treesit.el # Tree-sitter syntax
โ โโโ init-git.el # Git integration
โ โโโ init-terminal.el # Terminal configuration
โ โโโ init-[language].el # Language-specific configs
โ โโโ ...
โโโ straight/ # Package manager files
โโโ README.md # This file
โจ๏ธ Keybindings
Leader Keys
- SPC - Evil leader (Normal mode)
- C-c - Emacs leader
- , - Evil local leader
- C-c l - Emacs local leader
Core Bindings
- SPC f f - Find file
- SPC p f - Find file in project
- SPC b b - Switch buffer
- SPC w w - Switch window
- SPC TAB - Toggle treemacs
AI Integration
- SPC C - Claude Code IDE menu
- SPC a - Aidermacs menu
- M-y - AI completion (minibuffer)
- M-i - Show AI suggestion (overlay)
Completion
- M-p/n - Navigate completion candidates
- M-A - Accept completion
- M-a - Accept completion line
- M-e - Dismiss suggestion
๐ฏ Language-Specific Features
Go Development
- Go mode with LSP integration
- Automatic formatting on save
- Test execution support
Python Development
- Python LSP server
- Virtual environment support
- Jupyter integration (optional)
Web Development
- TypeScript, JavaScript, JSX/TSX support
- CSS/SCSS mode
- Web LSP servers
Rust Development
- Rust Analyzer LSP
- Cargo integration
- Error checking with flycheck
๐ง Customization
Adding New Packages
- Find the appropriate
init-*.elfile for the feature - Add the package using
use-package:(use-package package-name :straight t :config ;; your configuration )
Changing Theme
Edit elisp/init-theme.el:
;; Change this line
(load-theme 'doom-monokai-classic t)
;; To something like
(load-theme 'doom-gruvbox-light t)Font Configuration
Edit elisp/init-settings.el in the gilbert/set-font function:
(set-face-attribute 'default nil :family "Your Font Name")
(set-face-attribute 'default nil :height 130)๐ Troubleshooting
Common Issues
-
Packages not installing:
- Ensure you have a stable internet connection
- Try removing the
straight/directory and restart Emacs
-
Font issues:
- Install JetBrains Mono Nerd Font
- Check that the font is available to your system
-
AI integration not working:
- Verify 1Password CLI is installed and authenticated
- Check that API keys are stored in the correct vault paths
-
Performance issues:
- Run
emacs --debug-initto identify problematic configurations - Consider disabling unused modules in
init.el
- Run
Getting Help
- Use
SPC h b kto describe a keybinding - Use
SPC h vto describe a variable - Check the
*Messages*buffer for error messages
๐ค Contributing
Contributions are welcome! Please:
- Fork this repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
๐ License
This configuration is released under the MIT License. See the LICENSE file for details.
๐ Acknowledgments
- Built with straight.el package manager
- Inspired by various configurations from the Emacs community
- Thanks to all package authors for their amazing work
๐ Statistics
- 31 configuration modules covering different aspects of Emacs usage
- 15+ programming languages supported with dedicated configurations
- 6 AI providers integrated for enhanced productivity
- Modular architecture for easy customization and maintenance
Happy Emacs! ๐