Highlights
-
--sql@<alias>for per-block dialect override. Tag a template literal with--sql@rmand the extension resolves the dialect viasqlFormatAndHighlight.databases:Each block is formatted using its alias's dialect. Unmapped aliases fall back to the global
dialectsilently. The@aliastoken is compatible with other tools that already use--sql@dbfor routing — same marker, complementary purposes. -
Five new settings covering the rest of the
sql-formattersurface:dataTypeCase—upper/lower/preserveforINT,VARCHAR, etc. in DDL. Fixes a regression wherevarcharlowercase leaked through even withkeywordCase: upper.useTabs— tab-indented output.expressionWidth— line-wrap threshold.linesBetweenQueries— blank lines between;-separated statements.newlineBeforeSemicolon— closing;on its own line.
-
README revamped with a multi-database recipe and a stronger 'set your dialect once' opening — the generic default rejects vendor-specific syntax silently.
-
12 new T-SQL robustness tests covering bracketed identifiers,
DECLARE @var, CTE with;WITH,MERGE,TOP (N),OUTPUT INTO,@@vars,CROSS APPLY,IDENTITY_INSERT,BEGIN TRY/CATCH,EXEC sp_executesql, andOVER (PARTITION BY). Plus 7 detector tests for@<alias>extraction and 4 for the resolver.
Compatibility
Fully backwards compatible with 0.1.0. The new @<alias> syntax is opt-in; existing markers (--sql, --sql:flag, --sql:rm:verbose) keep working exactly as before.
See CHANGELOG.md for the full detail.