My emacs config
  • Emacs Lisp 100%
Find a file
2026-06-05 15:34:53 +02:00
doc Initial commit 2026-06-05 15:31:29 +02:00
hosts Add the hosts directory 2026-06-05 15:34:53 +02:00
lisp/age Initial commit 2026-06-05 15:31:29 +02:00
.gitignore Add the hosts directory 2026-06-05 15:34:53 +02:00
CLAUDE.md Initial commit 2026-06-05 15:31:29 +02:00
early-init.el Initial commit 2026-06-05 15:31:29 +02:00
eclipse-java-formatter.xml Initial commit 2026-06-05 15:31:29 +02:00
gnus.el Initial commit 2026-06-05 15:31:29 +02:00
init.el Initial commit 2026-06-05 15:31:29 +02:00
README.md Initial commit 2026-06-05 15:31:29 +02:00

Emacs config

Personal Emacs configuration. Targets Emacs 30.1+. On older versions the config still loads, but which-key-mode (built-in since 30.1) and minibuffer-regexp-mode will not be enabled.

Structure

File Purpose
early-init.el Early startup settings (before GUI and package init)
init.el Main configuration
gnus.el Gnus (mail/news) configuration
<hostname>.el Machine-local overrides (loaded if present)

Features

UI

  • Theme: wombat (customized comment, hl-line, region, and tab-bar faces; hl-line disabled in agent-shell-mode)
  • Font: PragmataPro Mono (monospace) / PragmataPro (variable-pitch), height 150
  • Tab bar enabled with menu bar, clock, and battery indicator
  • No tool bar, scroll bar, or blink cursor

Completion

  • fido-vertical-mode for minibuffer completion (built-in icomplete vertical UI)
  • Completion styles: basic, substring, flex
  • savehist-mode for persistent minibuffer history
  • corfu for in-buffer popup completion in all prog-mode buffers — see doc/corfu.md

Window management

All window commands are under C-c w. All bindings except o are repeatable via repeat-mode — after the first invocation, the short key alone continues the command without re-typing C-c w.

Key Command
C-c w <arrow> Move to window in direction
C-c w C-<arrow> Swap window states in direction
C-c w u Undo window layout (winner-undo)
C-c w r Redo window layout (winner-redo)
C-c w o Pick window by label (ace-window)
M-o Pick window by label (ace-window)

Keybindings

Key Command
C-<tab> / M-/ hippie-expand
M-u / M-l / M-c upcase-dwim / downcase-dwim / capitalize-dwim
M-z zap-up-to-char
C-M-<backspace> backward-kill-sexp
C-x C-b ibuffer
C-c C-r rename-this-buffer-and-file
C-c C-l d add-dir-local-variable
C-c C-l f add-file-local-variable
C-c s speedbar
C-c v vundo (visual undo tree)
C-c . eldoc-box-help-at-point
C-c C-j avy-resume
C-h M-m woman (man page viewer)
M-s O multi-occur

Position navigation:

Key Command
M-. Jump to definition (xref-find-definitions)
M-, Return from jump (xref-go-back)
C-SPC C-SPC Push current position onto the mark ring
C-u C-SPC Pop mark ring (return to last pushed position)
C-x r SPC <r> Save position to register <r>
C-x r j <r> Jump to position in register <r>
C-x C-SPC Pop global mark ring (crosses buffer boundaries)
C-x C-x Exchange point and mark
C-x r m Set named bookmark
C-x r b Jump to bookmark
C-x r l List all bookmarks

Navigation via goto-map (M-g):

Key Command
M-g c avy-goto-char-timer
M-g e avy-goto-word-0
M-g g avy-goto-line
M-g i imenu
M-g l imenu-list-smart-toggle
M-g s avy-goto-symbol-1
M-g w avy-goto-word-1

Project

Additional bindings in project-prefix-map (C-x p):

Key Command
C-x p c project-compile
C-x p t project-tasks (org-based task runner)

Debugging

dape provides Debug Adapter Protocol support. See doc/dap.md for adapter setup and keybindings.

LSP / Languages

Uses eglot (built-in) for LSP support with flymake for diagnostics. Eglot commands are under C-c l (my-eglot-map), only active in eglot-mode buffers.

Key Command
C-c l a eglot-code-actions
C-c l d eglot-find-declaration
C-c l f eglot-format
C-c l h eldoc
C-c l i eglot-find-implementation
C-c l I eglot-inlay-hints-mode
C-c l r eglot-rename
C-c l t eglot-find-typeDefinition
M-n / M-p Next/previous flymake error

Languages configured:

  • C / C++c-ts-mode / c++-ts-mode (tree-sitter), clangd, format on save
  • Gogo-ts-mode (tree-sitter), gopls, format on save
  • Haskellhaskell-mode with interactive-haskell-mode, HLS with fourmolu formatter
  • Rustrust-mode (tree-sitter), rust-analyzer with Clippy, format on save

Haskell REPL keybindings (in haskell-mode-map):

Key Command
C-c C-c Build with Cabal
C-c C-i Show info at point
C-c C-k Clear REPL
C-c C-l Load file
C-c C-t Show type at point
C-c c Run Cabal command
C-c i Bring up REPL

Setup

Tree-sitter grammars for C, C++, Go, Haskell, and Rust must be installed before their respective tree-sitter modes work fully. Run M-x install-treesitter-languages once after a fresh install.

Performance

  • gc-cons-threshold set to 128 MB in early-init.el to reduce GC pauses
  • load-prefer-newer t to always load .el over stale .elc
  • read-process-output-max set to 2 MB for LSP throughput

Security

  • age / rage for encrypting ~/.authinfo.age
  • Auth sources: ~/.authinfo.age, ~/.authinfo

Org

Babel languages enabled: emacs-lisp, eshell, go, haskell, lisp, rust, shell, sql, sqlite

Third-party packages

Package Purpose
ace-window Label-based window switching
agent-shell LLM agent shell (Claude Code via ACP) — see doc/agent-shell.md
avy Jump to any visible text
cargo-mode Cargo build integration for Rust
cmake-mode CMake build file editing
corfu In-buffer completion popup for programming modes — see doc/corfu.md
dape Debug Adapter Protocol client — see doc/dap.md
diff-hl VCS diff indicators in the fringe
diminish Hide minor mode lighters
dired-rsync rsync from dired
eldoc-box Popup eldoc documentation
envrc Per-project direnv environment integration — see doc/envrc.md
haskell-mode Haskell support
imenu-list Sidebar imenu navigator
magit Git interface
markdown-mode Markdown editing
ob-compile / ob-rust Org babel backends
paredit Structured editing for Lisp modes
project-tasks Org-based task runner per project
rust-mode Rust support
vc-fossil Fossil VCS backend
vundo Visual undo tree
wgrep Editable grep results