un-ts / prettier

:package: Opinionated but Incredible Prettier plugins.
https://prettier.vercel.app
MIT License
277 stars 26 forks source link

[prettier-plugin-sql] Broken indentation formatting in vscode #365

Closed sequencerr closed 4 months ago

sequencerr commented 5 months ago

npx prettier file gives normal result, but vscode, I guess extension gives incorrect result

formats like

const newLocal = sql`
SELECT
    first_name,

    species

FROM

    animals

WHERE

    id = ${id}
`;
sequencerr commented 5 months ago
endOfLine: 'crlf' | 'auto' | 'cr'

is cause. 'cr' gives a bit different result but it's still broken

LazyRichard commented 5 months ago

I had same issue. so, I create PR for this https://github.com/un-ts/prettier/pull/358

sequencerr commented 5 months ago

@LazyRichard any updates from maintainers?