kkinnear / zprint

Executables, uberjar, and library to beautifully format Clojure and Clojurescript source code and s-expressions.
MIT License
554 stars 47 forks source link

`;!zprint {:format :skip}` removes arglist when there's zero arg #284

Closed yqrashawn closed 1 year ago

yqrashawn commented 1 year ago
;!zprint {:format :skip}
(defn foo [] (prn 'a))

get formatted into

;!zprint {:format :skip}
(defn foo  (prn 'a))

check the video below, every time the file name at the bottom turns from red to white means there's a format applied tested with

{:style [:community]
 :width 105}

https://user-images.githubusercontent.com/15090582/210770236-0eb1a81d-c449-46d9-9cdc-0c32aa8f9353.mp4

kkinnear commented 1 year ago

Yes, this is a duplicate of Issue #263. It was unfortunately added when I rewrote the skipping and no-formatting code in 1.2.4. It is fixed and will ship in 1.2.5. If you don't need something in 1.2.4, then using 1.2.3 would make this problem go away. Alternatively, just avoid turning off formatting (or skipping) until 1.2.5 would be the only workarounds. #263 got closed before the fix actually shipped by the person who created the issue. I tend to leave them open until I actually ship the fix. I'm working steadily on fixing #273, for what that is worth.