maxdop for VS CodeMax Degree of Prettiness for your T-SQL. Formats T-SQL with maxdop — an opinionated formatter
built on Microsoft's own parser (
Two invariants that are the whole point
UseFormat a
The CLI is bundled — there is nothing to install separately, and nothing is downloaded on first activation. Using this alongside the mssql extensionThey are built to sit side by side. This extension contributes a document formatter and nothing else — no language server, no connection handling, no IntelliSense — so mssql keeps everything it does today and only formatting changes hands. Because both register a formatter for SQL, VS Code needs to know which one Format Document should
reach. Installing this extension makes it the default for
Either way, maxdop: Format Document in the Command Palette always formats with maxdop, so you can keep mssql on format-on-save and still reach for this one deliberately (it takes a keybinding). Selections are the one thing to know about: maxdop deliberately ships no range formatter, so Format Selection falls through to mssql's, whichever default you pick. Configuration lives in your repo, not your editorThere is exactly one extension setting, Everything about how code is formatted goes in a
The nearest Format Selection is not supported, on purposemaxdop formats whole files. Asking a formatter for a range and getting the whole document back is how "Format Selection" quietly reformats work outside the selection, so this extension registers no range formatter rather than pretending. |
