aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/rescript/indents.scm
blob: 0b635dd4d6f438e6ce0ca25bfd2db3ba606cc21b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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