mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
highlights(dart): use more specific groups
This commit is contained in:
parent
f30ae4da0d
commit
fe2ee54f3b
1 changed files with 24 additions and 14 deletions
|
|
@ -104,14 +104,14 @@
|
|||
|
||||
(type_identifier) @type
|
||||
|
||||
(type_alias
|
||||
(type_identifier) @type.definition)
|
||||
|
||||
; Variables
|
||||
; --------------------
|
||||
; var keyword
|
||||
(inferred_type) @keyword
|
||||
|
||||
(const_builtin) @constant.builtin
|
||||
(final_builtin) @constant.builtin
|
||||
|
||||
((identifier) @type
|
||||
(#match? @type "^_?[A-Z].*[a-z]")) ; catch Classes or IClasses not CLASSES
|
||||
|
||||
|
|
@ -160,7 +160,14 @@
|
|||
|
||||
; Keywords
|
||||
; --------------------
|
||||
["import" "library" "export"] @include
|
||||
[
|
||||
"import"
|
||||
"library"
|
||||
"export"
|
||||
"as"
|
||||
"show"
|
||||
"hide"
|
||||
] @include
|
||||
|
||||
; Reserved words (cannot be used as identifiers)
|
||||
[
|
||||
|
|
@ -195,16 +202,8 @@
|
|||
; Built in identifiers:
|
||||
; alone these are marked as keywords
|
||||
[
|
||||
"abstract"
|
||||
"as"
|
||||
"async"
|
||||
"async*"
|
||||
"sync*"
|
||||
"await"
|
||||
"covariant"
|
||||
"deferred"
|
||||
"dynamic"
|
||||
"external"
|
||||
"factory"
|
||||
"get"
|
||||
"implements"
|
||||
|
|
@ -214,11 +213,22 @@
|
|||
"mixin"
|
||||
"part"
|
||||
"set"
|
||||
"show"
|
||||
"static"
|
||||
"typedef"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
(const_builtin)
|
||||
(final_builtin)
|
||||
"abstract"
|
||||
"async"
|
||||
"async*"
|
||||
"covariant"
|
||||
"dynamic"
|
||||
"external"
|
||||
"static"
|
||||
"sync*"
|
||||
] @type.qualifier
|
||||
|
||||
; when used as an identifier:
|
||||
((identifier) @variable.builtin
|
||||
(#any-of? @variable.builtin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue