Create a proper Doom Emacs module for Claude Code integration that can later be submitted as a merge request to the official Doom Emacs repository.
Current Implementation
The Claude Code integration is currently implemented in the personal config with:
(use-package\! eat)
(use-package\! claude-code
:bind-keymap ("C-c c" . claude-code-command-map)
:config (claude-code-mode))
(after\! claude-code
(add-to-list 'display-buffer-alist
'("^\\*claude"
(display-buffer-in-side-window)
(side . right)
(window-width . 0.3))))
(defun gunnar/macos-notify (title message)
"Display macOS notification with sound."
(call-process "osascript" nil nil nil
"-e" (format
"display notification \"%s\" with title \"%s\" sound name \"Glass\""
message
title)))
(defun gunnar/linux-notify (title message)
"Display Linux notification using notify-send."
(call-process "notify-send" nil nil nil title message))
(defun gunnar/claude-notify (title message)
"Display cross-platform notification for Claude Code."
(cond ((eq system-type 'darwin) (gunnar/macos-notify title message))
((and (eq system-type 'gnu/linux) (executable-find "notify-send")) (gunnar/linux-notify title message))
(t (message "%s: %s" title message))))
Module Requirements
The module should:
-
Structure: Follow Doom's module conventions in modules/tools/claude-code/
config.el - Main configuration
packages.el - Package definitions
README.org - Documentation
-
Features:
- Auto-install
claude-code and eat packages
- Proper display buffer configuration for side windows
- Cross-platform notifications (macOS, Linux, fallback)
- Configurable keybindings (default:
C-c c)
- Integration with Doom's popup system
-
Flags: Support optional flags like:
+notifications - Enable system notifications
+popup - Use Doom's popup system instead of side windows
-
Configuration: Allow customization via:
claude-code-display-side (left/right/bottom)
claude-code-window-width
claude-code-keybind-prefix
-
Documentation: Include setup instructions and configuration options
Benefits
- Makes Claude Code easily available to all Doom users
- Follows Doom conventions and best practices
- Reduces duplicate configuration across user configs
- Enables contribution back to the Doom community
Files to modify/create:
modules/tools/claude-code/config.el
modules/tools/claude-code/packages.el
modules/tools/claude-code/README.org
- Update module index documentation
Create a proper Doom Emacs module for Claude Code integration that can later be submitted as a merge request to the official Doom Emacs repository.
Current Implementation
The Claude Code integration is currently implemented in the personal config with:
Module Requirements
The module should:
Structure: Follow Doom's module conventions in
modules/tools/claude-code/config.el- Main configurationpackages.el- Package definitionsREADME.org- DocumentationFeatures:
claude-codeandeatpackagesC-c c)Flags: Support optional flags like:
+notifications- Enable system notifications+popup- Use Doom's popup system instead of side windowsConfiguration: Allow customization via:
claude-code-display-side(left/right/bottom)claude-code-window-widthclaude-code-keybind-prefixDocumentation: Include setup instructions and configuration options
Benefits
Files to modify/create:
modules/tools/claude-code/config.elmodules/tools/claude-code/packages.elmodules/tools/claude-code/README.org