You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The formatter has one style. Settings > Editor > Keyword case decides the case it writes keywords in (customization/editor-settings.mdx:45), and everything else is fixed: two-space indent, a line per clause, one SELECT column per line, trailing commas, and each JOIN on its own line (features/sql-editor.mdx:183-204). The formatter already has an indent size option, but no setting reaches it and it ignores the editor's Tab width (apple/TablePro/Core/Services/Formatting/SQLFormatterTypes.swift:48-54).
A team whose house style differs on indent width, comma placement or where a join breaks has to reformat by hand after every use, or stop using the formatter.
Proposed solution
A Formatter section in Settings > Editor: indent width and character (or follow Tab width), keyword and function case, leading or trailing commas, line width, a break before or after each join, and whether to align aliases.
A live preview beside the options, in the current editor theme.
Export and import the rule set as a file, so a team can share one.
Read a .sql-formatter.json from a linked SQL folder when one is present, for the files opened from that folder.
Done when: each option changes the output of Format Query as the preview shows, and a rule file imported on a second Mac formats the same statement identically.
Activity