diff options
| author | Akin Sowemimo <akin.sowemimo@gmail.com> | 2020-09-23 21:48:14 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2020-09-24 00:00:59 +0200 |
| commit | 98c12ec23a6df2f2f505304b61c4b2eefc0a568f (patch) | |
| tree | 1aa74ac182edeb6414efc884d0810732e8c95d1a | |
| parent | Highlight top-level 'require' as TSInclude (fix #463) (diff) | |
| download | nvim-treesitter-98c12ec23a6df2f2f505304b61c4b2eefc0a568f.tar nvim-treesitter-98c12ec23a6df2f2f505304b61c4b2eefc0a568f.tar.gz nvim-treesitter-98c12ec23a6df2f2f505304b61c4b2eefc0a568f.tar.bz2 nvim-treesitter-98c12ec23a6df2f2f505304b61c4b2eefc0a568f.tar.lz nvim-treesitter-98c12ec23a6df2f2f505304b61c4b2eefc0a568f.tar.xz nvim-treesitter-98c12ec23a6df2f2f505304b61c4b2eefc0a568f.tar.zst nvim-treesitter-98c12ec23a6df2f2f505304b61c4b2eefc0a568f.zip | |
Improve the highlighting for class instantiation
So it finds _HiddenClasses as well as OtherClasses
| -rw-r--r-- | queries/dart/highlights.scm | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/queries/dart/highlights.scm b/queries/dart/highlights.scm index aa671d34d..433379a65 100644 --- a/queries/dart/highlights.scm +++ b/queries/dart/highlights.scm @@ -1,25 +1,25 @@ (dotted_identifier_list) @string ; Methods - +; -------------------- (function_type name: (identifier) @method) (super) @function ; Annotations +; -------------------- (annotation name: (identifier) @attribute) (marker_annotation name: (identifier) @attribute) ; Operators and Tokens - -; FIXME: nodes not accessible and ranges currently incorrect -; (template_substitution -; "${" @punctuation.special -; "}" @punctuation.special) @embedded - -(template_substitution (identifier) @embedded) +; -------------------- +(template_substitution + "$" @punctuation.special + "{" @punctuation.special + "}" @punctuation.special +) @embedded [ "@" @@ -54,7 +54,7 @@ ] @punctuation.bracket ; Delimiters - +; -------------------- [ ";" "." @@ -62,7 +62,7 @@ ] @punctuation.delimiter ; Types - +; -------------------- (class_definition name: (identifier) @type) (constructor_signature @@ -92,7 +92,7 @@ (type_identifier) @type ; Variables - +; -------------------- ; var keyword (inferred_type) @keyword @@ -100,7 +100,7 @@ (final_builtin) @constant.builtin ((identifier) @type - (#match? @type "^[A-Z]")) + (#match? @type "^_?[A-Z]")) ("Function" @type) @@ -119,7 +119,7 @@ (this) @variable.builtin ; Parameters - +; -------------------- (formal_parameter name: (identifier) @parameter) @@ -127,7 +127,7 @@ (label (identifier) @parameter)) ; Literals - +; -------------------- [ (hex_integer_literal) (decimal_integer_literal) @@ -147,7 +147,7 @@ (comment) @comment ; Keywords - +; -------------------- ["import" "library" "export"] @include ; Reserved words (cannot be used as identifiers) |
