Markdown files deserve the same format-on-save treatment we give to code. I recently integrated https://github.com/rvben/rumdl , a Rust-based markdown linter, into my Emacs setup using Apheleia. Here’s what I learned.
Why rumdl?
rumdl is fast—benchmarks show it processing 478 markdown files in under a second. It implements 54 lint rules, supports automatic fixing, and provides stdin/stdout support for editor integration. That last feature is key for Apheleia.
Apheleia Configuration
Apheleia expects formatters to read stdin and write to stdout. Configuration follows a two-step pattern:
;; 1. Define the formatter command
(setf (alist-get 'rumdl apheleia-formatters)
'("rumdl" "fmt" "--stdin"))
;; 2. Associate with major modes
(setf (alist-get 'markdown-mode apheleia-mode-alist) 'rumdl)
(setf (alist-get 'gfm-mode apheleia-mode-alist) 'rumdl)
With apheleia-global-mode enabled, markdown files now format automatically on save.
Format-on-save for markdown eliminates the mental overhead of consistent formatting. rumdl handles it fast enough that you won’t notice it’s running.