Improve the highlighting for class instantiation

So it finds _HiddenClasses as well as OtherClasses
This commit is contained in:
Akin Sowemimo 2020-09-23 21:48:14 +01:00 committed by Stephan Seitz
parent 3818cc29d0
commit 98c12ec23a

View file

@ -1,25 +1,25 @@
(dotted_identifier_list) @string (dotted_identifier_list) @string
; Methods ; Methods
; --------------------
(function_type (function_type
name: (identifier) @method) name: (identifier) @method)
(super) @function (super) @function
; Annotations ; Annotations
; --------------------
(annotation (annotation
name: (identifier) @attribute) name: (identifier) @attribute)
(marker_annotation (marker_annotation
name: (identifier) @attribute) name: (identifier) @attribute)
; Operators and Tokens ; Operators and Tokens
; --------------------
; FIXME: nodes not accessible and ranges currently incorrect (template_substitution
; (template_substitution "$" @punctuation.special
; "${" @punctuation.special "{" @punctuation.special
; "}" @punctuation.special) @embedded "}" @punctuation.special
) @embedded
(template_substitution (identifier) @embedded)
[ [
"@" "@"
@ -54,7 +54,7 @@
] @punctuation.bracket ] @punctuation.bracket
; Delimiters ; Delimiters
; --------------------
[ [
";" ";"
"." "."
@ -62,7 +62,7 @@
] @punctuation.delimiter ] @punctuation.delimiter
; Types ; Types
; --------------------
(class_definition (class_definition
name: (identifier) @type) name: (identifier) @type)
(constructor_signature (constructor_signature
@ -92,7 +92,7 @@
(type_identifier) @type (type_identifier) @type
; Variables ; Variables
; --------------------
; var keyword ; var keyword
(inferred_type) @keyword (inferred_type) @keyword
@ -100,7 +100,7 @@
(final_builtin) @constant.builtin (final_builtin) @constant.builtin
((identifier) @type ((identifier) @type
(#match? @type "^[A-Z]")) (#match? @type "^_?[A-Z]"))
("Function" @type) ("Function" @type)
@ -119,7 +119,7 @@
(this) @variable.builtin (this) @variable.builtin
; Parameters ; Parameters
; --------------------
(formal_parameter (formal_parameter
name: (identifier) @parameter) name: (identifier) @parameter)
@ -127,7 +127,7 @@
(label (identifier) @parameter)) (label (identifier) @parameter))
; Literals ; Literals
; --------------------
[ [
(hex_integer_literal) (hex_integer_literal)
(decimal_integer_literal) (decimal_integer_literal)
@ -147,7 +147,7 @@
(comment) @comment (comment) @comment
; Keywords ; Keywords
; --------------------
["import" "library" "export"] @include ["import" "library" "export"] @include
; Reserved words (cannot be used as identifiers) ; Reserved words (cannot be used as identifiers)