Skip to content

v1.3.0

Choose a tag to compare

@github-actions github-actions released this 15 Apr 08:31
db3e891
Document formatting (1.3.0) (#5)

* feat(formatting): re-indent + trim whitespace pass for textDocument/formatting

Whitespace-only formatter that walks the document tracking string and
comment state so braces inside those don't move the indent depth. Each
line is re-indented to its brace depth, trailing whitespace is trimmed,
runs of blank lines collapse to one, and the file is given exactly one
trailing newline. Honours the client's TabSize and InsertSpaces options.
Token content is never modified — broken docs format the parts that
parse cleanly.

* feat(formatting): advertise DocumentFormattingProvider in capabilities

* test(formatting): cover indentation, trim, blanks, tabs, strings, finalize

* docs: cut 1.3.0 with document formatting