Closed stumitchell closed 1 year ago
I'm 95% sure that that information isn't available in the macroexpansion, you only get the parsed s-expression data. I think you'd need to use a Clojure formatter to reformat this to something reasonable.
@danielcompton Yes, understood. We created this issue to remind us that the reformatting is not working on this code. Perhaps because it is too simple. Anyway, more investigation needed.
Perhaps we should move to use a different (better?) code reformatter. For example, Calva uses cljfmt
I don't think cljfmt will break the lines for you given the data. I haven't investigated deeply, but possibly something like https://github.com/greglook/cljstyle or https://github.com/nedap/formatting-stack might be able to reform code from data.
"Can't repro with the provided function. Zprint is working as intended on my local build. I checked on both 1.7.0 and 1.6.0.
It is interesting that you'd get this result, since we've been formatting this code with zprint since at least 2018. Zprint won't reproduce the exact linebreaks in your code, but it does format your example reasonably, spreading it over 4 lines.
Closing for now.
The following code is not indented