sorawee / fmt

A code formatter for Racket
Other
72 stars 6 forks source link

format and at-exp #55

Open db7 opened 4 months ago

db7 commented 4 months ago

It seems that fmt does not like at-exp.

Example:

#lang at-exp racket/base
@displayln{some string}

Now if I run raco fmt I get the following weird output:

$ raco fmt at-exp.rkt 
#lang at-exp racket/base
@
displayln
{text}

The @cmd{args} got split in several lines and the string argument was replaced with "text".

I probably overlooked something, but is there a way how to turn this behavior off?

sorawee commented 4 months ago

My recommendation would be to not run fmt on a #lang at-exp file at all.

I saw your comment in https://github.com/sorawee/fmt/issues/22#issuecomment-2132134918. This feature is not yet implemented in the current version of fmt, but it is implemented for the next version of fmt (see my presentation at https://www.youtube.com/watch?v=5eLPShNtSI4). Unfortunately, I have been busy, and don't have time to release this next version.