This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
ALL edits go in config.org, NEVER in config.el.
config.el is auto-generated by tangling config.org via Doom's :config literate module. Direct edits will be overwritten on doom sync.
doom sync # Run after ANY config changes (tangles, installs packages, rebuilds)
doom upgrade # Update Doom and all packages
doom doctor # Diagnose configuration issues
doom env # Regenerate environment snapshot| File | Edit? | Purpose |
|---|---|---|
config.org |
YES | Literate source of truth with org-mode + embedded elisp |
config.el |
NO | Auto-generated, never edit |
init.el |
YES | Enable/disable Doom modules via doom! macro |
packages.el |
YES | Declare packages via package! macro (no config here) |
elfeed-config.el |
YES | Standalone RSS/elfeed scoring config |
remarkable-config.el |
YES | Standalone reMarkable tablet integration (load!-ed from config.org) |
Use Doom macros where still applicable:
map!notdefine-key— EXCEPTION:define-keyis fine (and idiomatic) when building a standalone sparse keymap inside adefvarinitializer (e.g.bmg/ai-command-map,remarkable-command-map);map!cannot produce a keymap value there. Never re-label an existing Doom:prefixwith a which-key label — it silently wipes every binding under that prefix (Doom commit 635bc939d); use a bare:prefix "n"orwhich-key-add-keymap-based-replacements.
Use standard Emacs equivalents (Doom versions are deprecated):
setoptfordefcustomvariables (validates types); usesetqfor non-defcustom variables (Doom+prefixed vars,defvar) and complex template structures that failsetopttype validation (e.g., capture templates, agenda commands)with-eval-after-loadnotafter!use-packagenotuse-package!
Wrap all package configuration in with-eval-after-load blocks:
(with-eval-after-load 'org
(setopt org-directory "~/Documents/org/"))- Custom functions use
bmg/prefix — EXCEPTION: the reMarkable integration uses aremarkable-prefix as an embedded pseudo-package (it has its owndefgroup); keep that prefix consistent within the section - Sections delimited with
;;; BEGIN_SectionName/;;; END_SectionNamemarkers - All elisp files need
;;; filename.el -*- lexical-binding: t; -*-header - Config.org uses
#+BEGIN_SRC emacs-lispblocks for code
- No Evil mode - Uses standard Emacs keybindings
- Corfu + Vertico for completion (not Company/Ivy)
- LSP + tree-sitter for all supported languages
- Format on save enabled via
(format +lsp +onsave), but gated to projects that declare a formatter (treefmt.nix,.clang-format,rustfmt.toml, ...) — see theFormatOnSavesection inconfig.org.+lspformatting is always whole-buffer, so ungated it rewrites entire files in foreign repos. Override per project withbmg/format-on-savein.dir-locals.el. Note.editorconfigis intentionally not an opt-in marker. - Org-roam for Zettelkasten at
~/Documents/org/roam/ - GitHub Copilot for inline completions via
copilot.el - API keys stored in
~/.authinfo.gpg
- Nix:
nixdwith flake expressions pointing to~/.dotfiles - C/C++:
clangdwith background indexing and clang-tidy - Others: Standard LSP servers
- Edit
config.org - Run
doom sync - Restart Emacs or
M-x doom/reload - Verify with
doom doctor
See .github/copilot-instructions.md for comprehensive details on modules, keybindings, and org-mode configuration.