potygen icon indicating copy to clipboard operation
potygen copied to clipboard

Consider using prettier-plugin-embed with @potygen/prettier-plugin-pgsql

Open karlhorky opened this issue 2 years ago • 1 comments

Hi there, first of all, thanks for the effort that's being put into the PostgreSQL ecosystem!

I recently encountered prettier-plugin-embed by @Sec-ant, which enables usage of an SQL formatter such as prettier-plugin-sql inside of a tagged template literal:

  • https://github.com/Sec-ant/prettier-plugin-embed/issues/20

I was thinking that you may want to also move @potygen/prettier-plugin-pgsql to use prettier-plugin-embed instead of the custom @potygen/prettier Prettier fork, which seems like it will take a lot of maintenance effort over time

Alternatives considered

Ideally, even better, your PR below would be merged into Prettier for first-class support of other tagged template literal formats:

  • https://github.com/prettier/prettier/pull/12139

Or if someone else manages to resolve this issue in Prettier, that would also be a path forward for first-class support:

  • https://github.com/prettier/prettier/issues/4424

But both of these have been open for a while without good traction with the Prettier team, which leads me to believe that they will probably not be resolved any time soon (or ever?)

karlhorky avatar Oct 30 '23 15:10 karlhorky

Wow that's amazing! Will certainly check it out!

ivank avatar Nov 25 '23 11:11 ivank