feat(format): Doc-IR core, line_width (120) and where_wrap when_long

This commit is contained in:
Hein
2026-10-06 14:44:45 +02:00
parent 4ff729eeeb
commit 553609e988
7 changed files with 257 additions and 2 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ Legend: ✅ done · 🚧 in progress · ⬜ not started
function call at the token level — formatted without space (known limitation).
- Note: SQL keywords inside PL/pgSQL function bodies remain lowercase (matching
the corpus golden files); casing is applied only to top-level DML.
- _Still TODO: Wadler Doc-IR printer for width-aware wrapping of long lines._
- ✅ Doc-IR core (`pkg/format/doc.go`: Text/Line/SoftLine/Group/Indent/IfBreak + `Render`) and `line_width` (default 120, 0 = unlimited). First consumer: `where_wrap: when_long` (`dmlWhereWhenLong`). _Still TODO: move the remaining DML builders (select lists, CASE, joins, subqueries) from string assembly onto Doc._
- _Still TODO: LSP range formatting._
## ✅ Config expansion — DataGrip settings parity