I'm wrapping up the last two pages of documentation for my thing and while documenting a handful of example commands in interactive mode, I thought
"Man wouldn't it be nice if this had syntax highlighting, at least for keywords and arguments? I wouldn't need to use 'console' for sphinx code blocks, and it would not be this drab gray..."
Fast forward 45 minutes later, I'm in the middle of a gnarly custom Pygments regex lexer and I think:
"Oh but what if I just read the commands module source tree and parsed the AST to extract command names from functions that have the typer decorator? I would never need to maintain that list again and they'd always be keywords!"
The real "What the fuck am I doing with my life?" moment was marginally offset by how it actually worked on first try, against all expectations.
Sphinx is insidious. Once you start extending it there's no end in sight.