aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--queries/elixir/indents.scm19
1 files changed, 12 insertions, 7 deletions
diff --git a/queries/elixir/indents.scm b/queries/elixir/indents.scm
index 2c1419294..517f66940 100644
--- a/queries/elixir/indents.scm
+++ b/queries/elixir/indents.scm
@@ -1,18 +1,23 @@
[
- (arguments)
+ (block)
(do_block)
(list)
(map)
+ (stab_clause)
(tuple)
+ (arguments)
] @indent
[
")"
"]"
- "end"
+ "after"
+ "catch"
+ "else"
+ "rescue"
"}"
- (after_block)
- (else_block)
- (rescue_block)
- (catch_block)
-] @branch
+ "end"
+] @indent_end @branch
+
+; Elixir pipelines are not indented, but other binary operator chains are
+((binary_operator operator: _ @_operator) @indent (#not-eq? @_operator "|>"))