fmt icon indicating copy to clipboard operation
fmt copied to clipboard

Structs with short type properties get forced onto two lines

Open jackfirth opened this issue 1 year ago • 0 comments

This code:

(struct point (x y)
  #:guard (λ (x y _) (values x y))
  #:property prop:custom-print-quotable 'never
  #:inspector #false)

Gets reformatted into this:

(struct point (x y)
  #:guard (λ (x y _) (values x y))
  #:property prop:custom-print-quotable
  'never
  #:inspector #false)

That seems less than ideal. If the value associated with the property was a long and complicated lambda, I think this would make more sense. But if it's just a short and simple value, keeping the entire property declaration on one line seems more readable.

jackfirth avatar Aug 21 '24 20:08 jackfirth