fmt
fmt copied to clipboard
Too much horizontal indentation
fmt currently formats this code:
(void
(thread
(λ ()
(let loop ()
(define vec (sync evt))
(define str (vector-ref vec 1))
(when (regexp-match #rx"^cm: *compil(ing|ed)" str)
(display str)
(newline))
(loop)))))
Into this:
(void (thread (λ ()
(let loop ()
(define vec (sync evt))
(define str (vector-ref vec 1))
(when (regexp-match #rx"^cm: *compil(ing|ed)" str)
(display str)
(newline))
(loop)))))
The original is much more readable to me. This is related to the discussion in racket/drracket#678 about how fmt prioritizes minimizing vertical space over minimizing indentation. In the (void (thread ...)) case, things are a bit simpler because each of those forms has exactly one subform.