aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/hare/indents.scm
blob: 9e41ea6d0221e9b4164c148c2809cc29dbea37ba (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
37
38
39
40
41
42
43
44
45
[
  (enum_type)
  (struct_type)
  (tuple_type)
  (union_type)
  (block)
  (for_statement)
  (call_expression)
  (case)
  (array_literal)
  (struct_literal)
  (tuple_literal)
] @indent.begin

(if_statement
  ("("
    condition: (_)
    ")") @indent.begin)

[
  "}"
  "]"
  ")"
] @indent.end

[
  "{"
  "}"
] @indent.branch

[
  "["
  "]"
] @indent.branch

[
  "("
  ")"
] @indent.branch

[
  (ERROR)
  (comment)
  (concatenated_string)
] @indent.auto