You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make lsp-java-format-tab-size compatible with java-ts-mode (#456)
fix#447, fix#451
Currently `lsp-java-format-tab-size` is `c-basic-offset`. By default
c-basic-offset is a special value `set-from-style. When java-mode starts it will
get set c-basic-offset to a number such as 4 or 2.
java-ts-mode won't do anything with c-basic-offset. So lsp will fail to generate
the initializationOptions json because tabSize is set-from-style.
This MR turn lsp-java-format-tab-size to a function to return correct indent
setting depending whether java-ts-mode is on or not.
This s a fancy solution. A simple and fool proof one can be a number value
```elisp
(lsp-defcustom lsp-java-format-tab-size 4
"The basic offset"
:type 'number
:lsp-path "java.format.tabSize")
```
0 commit comments