aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/tact/indents.scm
blob: 1d05d4d82b0a79a481137ecfb5d14bbc134bbb57 (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
46
47
48
49
50
51
52
; indent.begin       ; indent children when matching this node
; ------------
[
  ; (..., ...)
  (parameter_list)
  (argument_list)
  ; {..., ...}
  (instance_argument_list)
  (destruct_bind_list)
  ; {...; ...}
  (message_body)
  (struct_body)
  (contract_body)
  (trait_body)
  (function_body)
  (block_statement)
  (asm_function_body)
  ; misc.
  (binary_expression)
  (ternary_expression)
  (return_statement)
  (static_call_expression)
  (method_call_expression)
] @indent.begin

; indent.branch      ; dedent itself when matching this node
; -------------
[
  "}"
  ")"
  ">"
] @indent.branch

; indent.end         ; marks the end of indented block
; ----------
[
  "}"
  ")"
  ">"
] @indent.end

; indent.auto        ; behaves like 'autoindent' buffer option
; -----------
[
  (comment)
  (ERROR)
] @indent.auto

; indent.align       ; behaves like python aligned/hanging indent
; indent.dedent      ; dedent children when matching this node
; indent.ignore      ; do not indent in this node
; indent.zero        ; sets this node at position 0 (no indent)