BucketTemplate icon indicating copy to clipboard operation
BucketTemplate copied to clipboard

set json format to keep new lines in vscode settings

Open XBagon opened this issue 2 years ago • 1 comments

When json.format.keepLines is set to false in the global VSCode settings it clashes with the .editorconfig option insert_final_newline = true and the line gets removed again directly after automatic insertion. Setting "json.format.keepLines" = "true" in the workspace settings fixes this.

XBagon avatar Jun 13 '23 17:06 XBagon

1| {
2|   "name": "foo",
3| 
4|   "age": 1
5| 
6| }
7| 
8| 

L3, 5, 7, 8 cannot be formatted, when this config item enabled.

HUMORCE avatar Jun 18 '23 00:06 HUMORCE

https://github.com/microsoft/vscode/issues/19281#issuecomment-275242735

use this "files.insertFinalNewline": true

qianlongzt avatar Oct 06 '24 12:10 qianlongzt