aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/rescript/indents.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/rescript/indents.scm')
-rw-r--r--runtime/queries/rescript/indents.scm36
1 files changed, 36 insertions, 0 deletions
diff --git a/runtime/queries/rescript/indents.scm b/runtime/queries/rescript/indents.scm
new file mode 100644
index 000000000..0b635dd4d
--- /dev/null
+++ b/runtime/queries/rescript/indents.scm
@@ -0,0 +1,36 @@
+[
+ (block)
+ (record_type)
+ (record)
+ (parenthesized_expression)
+ (call_expression)
+ (function_type_parameters)
+ (function)
+ (switch_match)
+ (let_declaration)
+ (jsx_element)
+ (jsx_fragment)
+ (jsx_self_closing_element)
+ (object_type)
+] @indent.begin
+
+[
+ "}"
+ ")"
+ (jsx_closing_element)
+] @indent.branch @indent.end
+
+(jsx_self_closing_element
+ "/" @indent.branch
+ ">"? @indent.end)
+
+; </> is captured as 3 different anonymous nodes
+(jsx_fragment
+ "<"
+ "<" @indent.branch)
+
+(jsx_fragment
+ ">"
+ ">" @indent.end)
+
+(comment) @indent.auto