mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 00:00:39 -08:00
* test/lisp/progmodes/java-ts-mode-resources/indent.erts: New file
with tests for indentation.
* test/lisp/progmodes/java-ts-mode-resources/movement.erts: New file
with tests for movement.
* test/lisp/progmodes/java-ts-mode-tests.el: New tests.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts: New
file with tests for indentation.
* test/lisp/progmodes/typescript-ts-mode-tests.el: New tests.
(cherry picked from commit c8dd37b16c)
44 lines
519 B
Text
44 lines
519 B
Text
Code:
|
|
(lambda ()
|
|
(setq indent-tabs-mode nil)
|
|
(setq java-ts-mode-indent-offset 2)
|
|
(java-ts-mode)
|
|
(indent-region (point-min) (point-max)))
|
|
|
|
Point-Char: |
|
|
|
|
Name: Basic
|
|
|
|
=-=
|
|
public class Basic {
|
|
public void basic() {
|
|
return;
|
|
}
|
|
}
|
|
=-=-=
|
|
|
|
Name: Empty Line
|
|
|
|
=-=
|
|
public class EmptyLine {
|
|
public void emptyLine() {
|
|
|
|
|
}
|
|
}
|
|
=-=-=
|
|
|
|
Name: Statements
|
|
|
|
=-=
|
|
if (x) {
|
|
for (var foo : foos) {
|
|
|
|
|
}
|
|
} else if (y) {
|
|
for (int i = 0; x < foos.size(); i++) {
|
|
return;
|
|
}
|
|
} else {
|
|
return;
|
|
}
|
|
=-=-=
|