aboutsummaryrefslogtreecommitdiffstats
path: root/queries/php/indents.scm
diff options
context:
space:
mode:
authortk-shirasaka <tk.shirasaka@gmail.com>2024-01-20 21:34:49 +0900
committerGitHub <noreply@github.com>2024-01-20 12:34:49 +0000
commit64b3d5e5698d485a4f197ffbe85a4b6c29e16325 (patch)
treedf6723ec690b4b4dad98cdcbffaa99c3a66b4587 /queries/php/indents.scm
parentfix(highlights): use `markup.raw.delimiter` for fences (diff)
downloadnvim-treesitter-64b3d5e5698d485a4f197ffbe85a4b6c29e16325.tar
nvim-treesitter-64b3d5e5698d485a4f197ffbe85a4b6c29e16325.tar.gz
nvim-treesitter-64b3d5e5698d485a4f197ffbe85a4b6c29e16325.tar.bz2
nvim-treesitter-64b3d5e5698d485a4f197ffbe85a4b6c29e16325.tar.lz
nvim-treesitter-64b3d5e5698d485a4f197ffbe85a4b6c29e16325.tar.xz
nvim-treesitter-64b3d5e5698d485a4f197ffbe85a4b6c29e16325.tar.zst
nvim-treesitter-64b3d5e5698d485a4f197ffbe85a4b6c29e16325.zip
feat: add the php_only parser included in tree-sitter-php (#5876)
Add parser `php_only` for PHP files without HTML embedded. Make queries for combined parser `php` inherit from `php_only` (no extensions needed). --------- Co-authored-by: shirasaka <tk.shirasaka@gmail>
Diffstat (limited to 'queries/php/indents.scm')
-rw-r--r--queries/php/indents.scm39
1 files changed, 1 insertions, 38 deletions
diff --git a/queries/php/indents.scm b/queries/php/indents.scm
index a81faed62..f32463888 100644
--- a/queries/php/indents.scm
+++ b/queries/php/indents.scm
@@ -1,38 +1 @@
-[
- (array_creation_expression)
- (compound_statement)
- (declaration_list)
- (binary_expression)
- (return_statement)
- (arguments)
- (formal_parameters)
- (enum_declaration_list)
- (switch_block)
- (match_block)
- (case_statement)
-] @indent.begin
-
-[
- ")"
- "}"
- "]"
-] @indent.branch
-
-(comment) @indent.auto
-
-(compound_statement
- "}" @indent.end)
-
-(ERROR
- "(" @indent.align
- .
- (_)
- (#set! indent.open_delimiter "(")
- (#set! indent.close_delimiter ")"))
-
-(ERROR
- "[" @indent.align
- .
- (_)
- (#set! indent.open_delimiter "[")
- (#set! indent.close_delimiter "]"))
+; inherits: php_only