Use a different SQL formatter
The horrific formatting of this file is forced by the formatter that's currently used
https://github.com/dullbananas/lemmy/blob/bliss/replaceable_schema.sql
Any suggestions? You could also try adjusting the configuration of pg_format.
I remember trying this prettier plugin for SQL, but I don't think it worked as well.
Doesn't format function bodies:
- sqlformat from the sqlparse python package
- prettier-plugin-sql
Not fully implemented yet; throws syntax error:
The link to the query above no longer works so I can't see exactly what you mean. But last time I investigated SQL formatters, the one we use now was the best there was. I checked the prettier plugin as well but it didn't work.
In a different project, what I did was add a filter if the file starts with -- pgFormatter-ignore it is skipped and not formatted. That "fixed" the few cases where pgformatter was annoying.
Feel free to open a PR for this.