Line length of the eclipse formatter not working.
I use
nmap <leader>f <Plug>(coc-format)<CR>
to format my files. I have checkstyle configured so the max line length is 120. After I format a .java file I saw that sometimes this line length is not being respected. Lets say an annotation at the beginning of the class:
@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE)
This line is 121 character long, even after formatting it therefore checkstyle fails.
I tried editing the formatter settings (inside the created file after the 'java.open.formatter.settings') but that didn't helped.
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="119"/>
Should be problem of your language server, checkout https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel
You may need to configure java.format.settings.url by :CocCommand java.open.formatter.settings