lsp-java icon indicating copy to clipboard operation
lsp-java copied to clipboard

Formatter settings being ignored?

Open evstraw opened this issue 8 years ago • 1 comments

I have set the lsp-java-format-settings-url and lsp-java-format-settings-profile variables to a valid path to a format settings .xml file generated with Eclipse, and the profile name in that file, respectively, as done in this file (referenced in Issue #61). I have verified with M-x describe-variable that these variables were set correctly.

However, it appears like nothing has happened. Most notably, I have specified indents in that file to be 4 spaces, and running lsp-format-buffer still formats with 2 spaces. None of my other formatting changes apply either.

Am I doing something wrong here? Or is this a bug?

evstraw avatar Nov 21 '18 07:11 evstraw

I guess it is a missing documentation piece - in addition to the formatter settings lsp-mode sends the currently set tab-width which is overriding the formatter value. I haven't investigated whether lsp-mode is doing the correct thing.

yyoncho avatar Nov 21 '18 07:11 yyoncho