fmt icon indicating copy to clipboard operation
fmt copied to clipboard

Long hash expressions linebreak inconveniently

Open jackfirth opened this issue 1 year ago • 0 comments

fmt currently changes this code:

(define formulas
  (hash 'water (list 'hydrogen 'oxygen)
        'benzene (list 'hydrogen 'carbon)
        'glucose (list 'hydrogen 'oxygen 'carbon)))

into this:

(define formulas
  (hash 'water
        (list 'hydrogen 'oxygen)
        'benzene
        (list 'hydrogen 'carbon)
        'glucose
        (list 'hydrogen 'oxygen 'carbon)))

This is unfortunate. Perhaps treat hash expressions and other similarly shaped built-ins with some special logic? However, that wouldn't work for my sorted maps in Rebellion, which face the same issue.

jackfirth avatar Aug 09 '24 01:08 jackfirth