Formatting not working correctly.
The java-formatter.xml 'org.eclipse.jdt.core.formatter.lineSplit' value 0 is not respected. Value 0 Should disable line-combining/breaks.
Environment
- Operating System: windows 10 x64
- JDK version: 17
- Visual Studio Code version: 1.75.1
- Java extension version: v1.15.0
Steps To Reproduce
- Set value to 0
- format document.
It looks like as expected. Please check the preview via command "Java: Open Java Formatter Settings with Preview"

Yes it is correct that your previewer displays it accurately. But per default the value 0, should disable linesplitting/line-merging, not set it to least possible.
We can find the same behavior in Eclipse. Does your mentioned "disable linesplitting/line-merging" is to do nothing about the code according to the line length? A sample snippet would be helpful.
Or do you want something like "preserving line breaks"? see also: https://github.com/redhat-developer/vscode-java/issues/2850
Ahh correct, my appoligize for wasting your time. I see that I have the setting "Never join already wrapped lines" on in Eclipse, which is what I was looking for. Which my guess is that is also what is written about i #2850 ?
I see that I have the setting "Never join already wrapped lines" on in Eclipse, which is what I was looking for.
Yeah, and I guess you need to also set a larger number for lineSplit, since the option only disables joining lines, not disables wrapping lines. Is it right?
Yes that is correct, i had tried that already, but it kept joining my lines, which was not my intention ;-) Do you know when "Never join already wrapped lines" will be functioning, and how to set it. Because I tried changing it in Eclipse, and there was no difference in the xml :-/
@AMetnik it's org.eclipse.jdt.core.formatter.join_wrapped_lines, when set to false the formatter will never join the wrappered lines.
Sweet, many many thanks !