Closed cloudlena closed 2 years ago
This is actually annoying even for vscode users: https://github.com/redhat-developer/vscode-java/wiki/Formatter-settings
You can make an eclipse formatter file: https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
is the important line.
Then pass
require('jdtls').setup{
-- ... all your other stuff
settings = {
java = {
format = {
settings = { url = "/path/to/local/settings.xml" }
}
}
}
Language server
jdtls
Requested feature
It would be great if I could somehow configure the maximum line length for the wrapping of JDTLS' formatting as described here: https://stackoverflow.com/questions/3697287/eclipse-set-maximum-line-length-for-auto-formatting
Other clients which have this feature
texlab (under
settings.texlab.formatterLineLength
)