feat(lsp): add textDocument/rangeFormatting support
CI / Test (push) Successful in 50s
CI / Build snapshot (push) Failing after 1m12s

Advertise DocumentRangeFormattingProvider in server capabilities and
implement rangeFormat: formats the complete document, then returns an
edit covering only the minimal changed-line region that overlaps the
client's selection. Also includes gofmt alignment fixes across lint
and format packages.
This commit is contained in:
2026-06-28 16:28:27 +02:00
parent a98dee1877
commit d1150a7eea
6 changed files with 168 additions and 23 deletions
+6 -6
View File
@@ -215,13 +215,13 @@ func formatBodyStatements(text string, st config.Style) string {
rawLines := strings.Split(normalised, "\n")
var (
result strings.Builder
stmt []bline
parenDepth int
blockDepth int // 0=col-0 (BEGIN/END/EXCEPTION), 1=body, 2=nested…
inException bool
result strings.Builder
stmt []bline
parenDepth int
blockDepth int // 0=col-0 (BEGIN/END/EXCEPTION), 1=body, 2=nested…
inException bool
pendingBlanks int
depthInc bool // increment blockDepth after next flush
depthInc bool // increment blockDepth after next flush
)
flush := func() {