mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
highlights(hack): fix captures
This commit is contained in:
parent
bedc763361
commit
6725bef5ce
3 changed files with 29 additions and 20 deletions
|
|
@ -6,15 +6,15 @@
|
|||
(braced_expression) @none
|
||||
|
||||
(scoped_identifier
|
||||
(qualified_identifier
|
||||
(qualified_identifier
|
||||
(identifier) @type))
|
||||
|
||||
(comment) @comment
|
||||
(heredoc) @comment
|
||||
|
||||
[
|
||||
"function"
|
||||
] @keyword.function
|
||||
(comment)
|
||||
(heredoc)
|
||||
] @comment
|
||||
|
||||
"function" @keyword.function
|
||||
|
||||
[
|
||||
"async"
|
||||
|
|
@ -23,20 +23,21 @@
|
|||
"interface"
|
||||
"implements"
|
||||
"class"
|
||||
"protected"
|
||||
"private"
|
||||
"public"
|
||||
"using"
|
||||
"namespace"
|
||||
"attribute"
|
||||
"const"
|
||||
(xhp_modifier)
|
||||
(final_modifier)
|
||||
"extends"
|
||||
"insteadof"
|
||||
] @keyword
|
||||
|
||||
"use" @include
|
||||
[
|
||||
"use"
|
||||
"include"
|
||||
"include_once"
|
||||
"require"
|
||||
"require_once"
|
||||
] @include
|
||||
|
||||
[
|
||||
"new"
|
||||
|
|
@ -47,9 +48,15 @@
|
|||
"as"
|
||||
] @keyword.operator
|
||||
|
||||
"return" @keyword.return
|
||||
|
||||
[
|
||||
"return"
|
||||
] @keyword.return
|
||||
(abstract_modifier)
|
||||
(final_modifier)
|
||||
(static_modifier)
|
||||
(visibility_modifier)
|
||||
(xhp_modifier)
|
||||
] @type.qualifier
|
||||
|
||||
[
|
||||
"shape"
|
||||
|
|
@ -92,10 +99,10 @@
|
|||
(qualified_identifier
|
||||
(identifier) @type .))
|
||||
|
||||
(attribute_modifier) @attribute
|
||||
[
|
||||
"@required"
|
||||
"@lateinit"
|
||||
(attribute_modifier)
|
||||
] @attribute
|
||||
|
||||
[
|
||||
|
|
@ -262,6 +269,8 @@
|
|||
[ "</" ">" ] @tag.delimiter)
|
||||
|
||||
[ "." ";" "::" ":" "," ] @punctuation.delimiter
|
||||
(qualified_identifier
|
||||
"\\" @punctuation.delimiter)
|
||||
|
||||
(ternary_expression
|
||||
["?" ":"] @conditional)
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@ class Box<T> {
|
|||
// ^ type
|
||||
// ^ type
|
||||
protected T $data;
|
||||
// ^ keyword
|
||||
// ^ type.qualifier
|
||||
// ^ type
|
||||
|
||||
public function __construct(T $data) {
|
||||
// ^ type
|
||||
// ^ parameter
|
||||
// ^ keyword.function
|
||||
// ^ keyword
|
||||
// ^ type.qualifier
|
||||
// ^ method
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
public function getData(): T {
|
||||
// ^ method
|
||||
// ^ keyword
|
||||
// ^ type.qualifier
|
||||
return $this->data;
|
||||
// ^ operator
|
||||
// ^ variable.builtin
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ use type Facebook\XHP\HTML\{XHPHTMLHelpers, a, form};
|
|||
|
||||
|
||||
final xhp class a_post extends x\element {
|
||||
// ^ keyword
|
||||
// ^ keyword
|
||||
// ^ type.qualifier
|
||||
// ^ type.qualifier
|
||||
// ^ keyword
|
||||
use XHPHTMLHelpers;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue