summaryrefslogtreecommitdiff
path: root/vendor/queries/php/indents.scm
blob: 48a289739ba68d9563f076619a413eeb909cb5a8 (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
; Vendored from helix (https://github.com/helix-editor/helix) at 278b24389:
; runtime/queries/php/indents.scm.
; Licensed under the Mozilla Public License 2.0 (vendor/queries/helix.LICENSE,
; https://mozilla.org/MPL/2.0/).

[
  (array_creation_expression)
  (arguments)
  (formal_parameters)
  (compound_statement)
  (declaration_list)
  (binary_expression)
  (return_statement)
  (expression_statement)
  (switch_block)
  ; statements after a `case`/`default` label (the node also holds the label,
  ; so the default tail scope indents only the body lines, not the label)
  (case_statement)
  (default_statement)
  (anonymous_function_use_clause)
  (property_hook_list)
] @indent

[
  "}"
  ")"
  "]"
] @outdent

; Heredoc / nowdoc bodies are literal content.
[
  (heredoc)
  (nowdoc)
] @opaque