2.5 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Repository Overview
This is a Doom Emacs configuration repository. It uses the Doom Emacs framework with evil-mode (vim keybindings) and contains custom Emacs Lisp packages organized in subdirectories.
Key Commands
After modifying init.el, packages.el, or adding new packages:
doom sync
To reload configuration without restarting Emacs:
M-x doom/reload
Run Emacs Lisp tests with ERT:
(ert "test-pattern-*") ; Run tests matching pattern
(ert t) ; Run all tests
Architecture
Configuration Files (Doom Standard)
init.el- Doom module declarations (what features to enable)config.el- Main user configurationpackages.el- Package declarations fordoom synccustom.el- Emacs customize system (auto-generated)
Custom Packages (loaded via add-load-path! in config.el)
coe-xx/ - Cross-stitch pattern editor (from Craft of Emacs guide)
coe-xx.el- Major mode for.coe-xxpattern files with visual displaycoe-demo.el- Demo functions for the guide
qwan/ - QWAN blog utilities
qwan-blog.el- Blog publishing helpers (draft to_posts/, link manipulation)qwan-refactor.el- Elisp refactoring utilities with ERT tests
mostalive/ - Personal org-roam extensions
my-org-roam.el-org-roam-node-insert-immediate(insert link without opening buffer), agenda file collectionjournelly-convert-entry-to-org-roam.el- Convert Journelly app entries to org-roam notesconvert-chats-to-org.el- Chat log formatting utilities
Testing
Tests are written using ERT (Emacs Lisp Regression Testing). Test functions use ert-deftest and follow naming convention test-* or match the function name being tested.
Example from qwan-refactor.el:
(ert-deftest refactor-rename-should-replace-space-with-dash ()
(should (equal (as-function-name "qwan/echo chamber") "qwan/echo-chamber")))
Language Support Configuration
- Elixir: Uses
elixir-ts-modewith eglot LSP (server at~/.elixir-ls/release/language_server.sh) - Haskell: LSP enabled via
+lspflag - TypeScript/JavaScript: LSP enabled, tree-sitter grammars auto-installed
- Org-mode: Heavy customization with org-roam, pomodoro, gnuplot, presentations
LLM Integration
Uses gptel package with:
- Default backend: local llama.cpp server at
localhost:8000 - Alternative: Ollama at
localhost:11434 - Presets defined:
explain,elixir