Ok, classic beginner gripe, I know. In general I’m all for opinionated formatting—I don’t agree with everything about elm-format
but it’s so nice to be able to switch off that part of my brain and leave it to do the work; and for there to be a single recognisable format community-wide. But I tried enabling format on save for ReScript for a day and I can just tell we’re not going to get along; it’s actively harming readability and usability.
It looks like the issues have mostly been discussed before (especially forced single-line structures). I don’t want to come in on day 3 of using a new language and kick up a fuss. Instead I’m turning off format on save, and I’ll try to keep my code formatted close to the standard, save for multiline flexibility and a couple of other tiny niggles.
So ideally I’d like to format any parts of a file where the formatter does a reasonable job, and/or use it to discover what the standard formatting for a given structure is. But format selection doesn’t seem to be working in VS Code. Neither is eg. format on save mode set to just “modifications”. So I’m wondering if the ReScript formatter only supports whole-file formatting? Is there a way to get selective formatting working?
Alternatively, I don’t suppose there are third-party alternative formatters available? I realise that the existence of such tools would somewhat undermine the aims of a single opinionated formatter, but for me the usability/readability costs of turning on the formatter outweigh the costs of even manual formatting.