Closed lenghan4real closed 1 week ago
I just tried this out and it seems to be working well What does your directory structure look like ? What does your formatter.xml
file look like ?
Note that the file given to java.format.settings.url
(in your case, formatter.xml
) must be a proper xml file. It should be at the root of your project (to match the path your giving) and look something :
formatter.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="13">
<profile kind="CodeFormatterProfile" name="MyProfile" version="13">
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="100"/>
</profile>
</profiles>
and in your project's .vscode/settings.json
, you should have something like :
.vscode/settings.json
{
"java.format.settings.url": "./formatter.xml"
}
I think even using a user-level setting should work, and it would find your formatter file at the root of the project.
Seems the profile is incorrect. After correction, it works. Thanks a lot.
lineSplit in formatter not working
Environment
Steps To Reproduce
Current Result
not split at all.
Expected Result
line split when 100