Amala Amala
Amala Amala

Reputation: 335

Disable auto line breaking in Java Formatter - VSCODE

I need to disable this auto line break my code in Java VS CODE Formatter

It's wrong

enter image description here

Expected:

enter image description here

Upvotes: 0

Views: 1790

Answers (1)

Molly Wang-MSFT
Molly Wang-MSFT

Reputation: 9461

This is because you open the wordWrap, but your current code length exceeds the max-length which has been set by default.

There're two solutions to your question, writing it in Settings.json:

1.Turn off the wordWrap:

    "editor.wordWrap":"off",

2.Still keep wordWrap on but changing the code's max-length:

   "editor.wordWrap": "wordWrapColumn",
   "editor.wordWrapColumn":200,

Upvotes: 0

Related Questions