diff options
| author | Caleb White <cdwhite3@pm.me> | 2024-03-18 22:42:44 -0500 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-03-27 08:29:44 +0100 |
| commit | 7d938c1c72ac21cd059ed9a71d50f1329b33d988 (patch) | |
| tree | c4a241a1f4222ad240fd73341eff241c858caefb /queries/php_only | |
| parent | fix(php): add missing keyword highlights, fix static keyword (diff) | |
| download | nvim-treesitter-7d938c1c72ac21cd059ed9a71d50f1329b33d988.tar nvim-treesitter-7d938c1c72ac21cd059ed9a71d50f1329b33d988.tar.gz nvim-treesitter-7d938c1c72ac21cd059ed9a71d50f1329b33d988.tar.bz2 nvim-treesitter-7d938c1c72ac21cd059ed9a71d50f1329b33d988.tar.lz nvim-treesitter-7d938c1c72ac21cd059ed9a71d50f1329b33d988.tar.xz nvim-treesitter-7d938c1c72ac21cd059ed9a71d50f1329b33d988.tar.zst nvim-treesitter-7d938c1c72ac21cd059ed9a71d50f1329b33d988.zip | |
fix(php): fix use_{as,instead_of}_clause highlights
Diffstat (limited to 'queries/php_only')
| -rw-r--r-- | queries/php_only/highlights.scm | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/queries/php_only/highlights.scm b/queries/php_only/highlights.scm index ab95ea603..e8b4a7825 100644 --- a/queries/php_only/highlights.scm +++ b/queries/php_only/highlights.scm @@ -26,7 +26,8 @@ (name) @type) ]) -(named_type (name) @type.builtin +(named_type + (name) @type.builtin (#any-of? @type.builtin "static" "self")) (class_declaration @@ -99,7 +100,9 @@ (list_literal "list" @function.builtin) -(exit_statement "exit" @function.builtin "(") +(exit_statement + "exit" @function.builtin + "(") (method_declaration name: (name) @function.method) @@ -123,6 +126,18 @@ (nullsafe_member_call_expression name: (name) @function.method) +(use_instead_of_clause + (class_constant_access_expression + (_) + (name) @function.method) + (name) @type) + +(use_as_clause + (class_constant_access_expression + (_) + (name) @function.method)* + (name) @function.method) + (method_declaration name: (name) @constructor (#eq? @constructor "__construct")) @@ -280,7 +295,6 @@ (yield_expression "from" @keyword.return) - [ "case" "else" |
