aboutsummaryrefslogtreecommitdiffstats
path: root/queries/php
diff options
context:
space:
mode:
authorInfectos <infectos@yandex.ru>2022-01-14 15:28:50 +0300
committerStephan Seitz <stephan.seitz@fau.de>2022-01-16 12:02:24 +0100
commit1da55c27ccb476194599f46d2ef832c73944d334 (patch)
treed3a4c87c409aa986976d9e1e711e9896fcfeea37 /queries/php
parentdoc(README): mention CONTRIBUTING for captures (diff)
downloadnvim-treesitter-1da55c27ccb476194599f46d2ef832c73944d334.tar
nvim-treesitter-1da55c27ccb476194599f46d2ef832c73944d334.tar.gz
nvim-treesitter-1da55c27ccb476194599f46d2ef832c73944d334.tar.bz2
nvim-treesitter-1da55c27ccb476194599f46d2ef832c73944d334.tar.lz
nvim-treesitter-1da55c27ccb476194599f46d2ef832c73944d334.tar.xz
nvim-treesitter-1da55c27ccb476194599f46d2ef832c73944d334.tar.zst
nvim-treesitter-1da55c27ccb476194599f46d2ef832c73944d334.zip
fix(php): change query for @constructor group
Diffstat (limited to 'queries/php')
-rw-r--r--queries/php/highlights.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/queries/php/highlights.scm b/queries/php/highlights.scm
index 17c3f28f5..91a08cf95 100644
--- a/queries/php/highlights.scm
+++ b/queries/php/highlights.scm
@@ -78,8 +78,9 @@
((name) @constant
(#vim-match? @constant "^_?[A-Z][A-Z\d_]+$"))
-((name) @constructor
- (#lua-match? @constructor "^[A-Z]"))
+(method_declaration
+ name: (name) @constructor
+ (#eq? @constructor "__construct"))
(const_declaration (const_element (name) @constant))