-
Notifications
You must be signed in to change notification settings - Fork 91
Closed
Description
The Google Java Style Guide re: switch statements, says "As with any other block, the contents of a switch block are indented +2."
So I would presume that if I have the following,
(add-hook 'java-mode-hook (defun my-set-java-tab-width () (setq tab-width 2)))
(setq lsp-java-format-settings-url "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml")
(setq lsp-java-format-settings-profile "GoogleStyle")Then M-x lsp-format-buffer should indent the switch statements as described.
That is, I would expect
switch(expression) {
case x:
// code block
break;
case y:
// code block
break;
default:
// code block
}But instead, I see
switch(expression) {
case x:
// code block
break;
case y:
// code block
break;
default:
// code block
}I created a reproduce in a Docker recipe at https://github.com/bradyt/docker-emacs/tree/lsp-java.
Metadata
Metadata
Assignees
Labels
No labels