microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.91k stars 29.17k forks source link

json-language-features: Add new line at EOF for code formatting #232717

Closed thernstig closed 3 hours ago

thernstig commented 3 hours ago

The json-language-features LSP code formatting should add a new line at EOF for code formatting.

It should according to POSIX, see https://stackoverflow.com/a/729795/1853417.

aeschli commented 3 hours ago

We have setting for this: 'files.insertFinalNewline' The value of the setting is passed to the formatter,