Skip to content

Honor explicit final-newline options in bend2-fmt-lsp - #2338

Draft
oxura wants to merge 1 commit into
bendlang:mainfrom
oxura:fix/fmt-final-newline-options-20261124
Draft

oxura wants to merge 1 commit into
bendlang:mainfrom
oxura:fix/fmt-final-newline-options-20261124

Conversation

@oxura

@oxura oxura commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Keep EOF newlines as they are unless the editor asks to add or trim them. An added newline follows the file’s line endings.

I sent both options through the stdio LSP server, including a CRLF-only file and extra mixed newlines at EOF. The formatter’s 38 tests and the repo gate (56/56) pass on Linux. The mini gates weren’t available.

Fixes #2337

Keep the existing default, and use the document’s line endings when adding a newline.

Fixes bendlang#2337
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Honor editor final-newline preferences in bend2-fmt-lsp

1 participant