summaryrefslogtreecommitdiff
path: root/queries/gleam
diff options
context:
space:
mode:
authorConnor Lay (Clay) <connorlay@pm.me>2022-02-12 15:12:05 -0800
committerStephan Seitz <stephan.seitz@fau.de>2022-02-15 19:01:02 +0100
commitb62750e328e9595b34a30db2d03a30f0f983776c (patch)
treec1755f061ed7f1b0e9f461a32b2134619bbb00ee /queries/gleam
parent4a5720332dd54146313d64ae6031c48f45475d2c (diff)
Gleam indentation tests
Diffstat (limited to 'queries/gleam')
-rw-r--r--queries/gleam/indents.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/queries/gleam/indents.scm b/queries/gleam/indents.scm
index e795ea09..e2259b68 100644
--- a/queries/gleam/indents.scm
+++ b/queries/gleam/indents.scm
@@ -1,16 +1,25 @@
; Gleam indents similar to Rust and JavaScript
[
+ (assert)
(case)
(case_clause)
(constant)
(expression_group)
+ (external_function)
(function)
+ (import)
(let)
(list)
+ (public_constant)
+ (public_external_function)
(public_function)
(public_opaque_type_definition)
+ (public_type_alias)
(public_type_definition)
+ (todo)
+ (try)
(tuple)
+ (type_alias)
(type_definition)
] @indent
@@ -19,3 +28,6 @@
"]"
"}"
] @indent_end @branch
+
+; Gleam pipelines are not indented, but other binary expression chains are
+((binary_expression operator: _ @_operator) @indent (#not-eq? @_operator "|>"))