summaryrefslogtreecommitdiff
path: root/vendor/queries/php/indents.scm
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/queries/php/indents.scm')
-rw-r--r--vendor/queries/php/indents.scm34
1 files changed, 34 insertions, 0 deletions
diff --git a/vendor/queries/php/indents.scm b/vendor/queries/php/indents.scm
new file mode 100644
index 00000000..48a28973
--- /dev/null
+++ b/vendor/queries/php/indents.scm
@@ -0,0 +1,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