summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/progmodes/lua-ts-mode-resources/indent.erts')
-rw-r--r--test/lisp/progmodes/lua-ts-mode-resources/indent.erts106
1 files changed, 106 insertions, 0 deletions
diff --git a/test/lisp/progmodes/lua-ts-mode-resources/indent.erts b/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
index 9797467bbe5..48184160b4d 100644
--- a/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
+++ b/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
@@ -529,6 +529,58 @@ local Other = {
}
=-=-=
+Name: Continuation Indent
+
+=-=
+local very_long_variable_name =
+"ok"..
+ "ok"
+local n = a +
+b *
+c /
+1
+local x = "A"..
+"B"
+.."C"
+if a
+ and b
+ and c then
+ if x
+ and y then
+ local x = 1 +
+2 *
+ 3
+ end
+elseif a
+ or b
+ or c then
+end
+=-=
+local very_long_variable_name =
+ "ok"..
+ "ok"
+local n = a +
+ b *
+ c /
+ 1
+local x = "A"..
+ "B"
+ .."C"
+if a
+ and b
+ and c then
+ if x
+ and y then
+ local x = 1 +
+ 2 *
+ 3
+ end
+elseif a
+ or b
+ or c then
+end
+=-=-=
+
Code:
(lambda ()
(setq indent-tabs-mode nil)
@@ -677,3 +729,57 @@ function e (n, t)
end)(i(...))
end end end
=-=-=
+
+Code:
+ (lambda ()
+ (setq indent-tabs-mode nil)
+ (setq lua-ts-indent-continuation-lines nil)
+ (setq lua-ts-indent-offset 2)
+ (lua-ts-mode)
+ (indent-region (point-min) (point-max)))
+
+Name: Unaligned Continuation Indent
+
+=-=
+local n = a +
+ b *
+ c /
+ 1
+if a
+ and b
+and c then
+ if x
+ and y then
+ local x = 1 +
+ 2 *
+ 3
+ end
+elseif a
+ or b
+ or c then
+ if x
+ or y
+ end
+end
+=-=
+local n = a +
+ b *
+ c /
+ 1
+if a
+and b
+and c then
+ if x
+ and y then
+ local x = 1 +
+ 2 *
+ 3
+ end
+elseif a
+or b
+or c then
+ if x
+ or y
+ end
+end
+=-=-=