mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 18:00:07 -04:00
Add case builtin
Based on accepted PR to unhide this node Also show Function as a type correctly and use existing annotation highlight for annotations
This commit is contained in:
parent
5c85e6beee
commit
8cc0b8d4c4
1 changed files with 6 additions and 6 deletions
|
|
@ -8,14 +8,13 @@
|
||||||
|
|
||||||
; Annotations
|
; Annotations
|
||||||
(annotation
|
(annotation
|
||||||
name: (identifier) @attribute)
|
name: (identifier) @annotation)
|
||||||
(marker_annotation
|
(marker_annotation
|
||||||
name: (identifier) @attribute)
|
name: (identifier) @annotation)
|
||||||
|
|
||||||
; Operators and Tokens
|
; Operators and Tokens
|
||||||
|
|
||||||
; FIXME: nodes not accessible and ranges
|
; FIXME: nodes not accessible and ranges currently incorrect
|
||||||
; currently incorrect
|
|
||||||
; (template_substitution
|
; (template_substitution
|
||||||
; "${" @punctuation.special
|
; "${" @punctuation.special
|
||||||
; "}" @punctuation.special) @embedded
|
; "}" @punctuation.special) @embedded
|
||||||
|
|
@ -103,6 +102,8 @@
|
||||||
((identifier) @type
|
((identifier) @type
|
||||||
(#match? @type "^[A-Z]"))
|
(#match? @type "^[A-Z]"))
|
||||||
|
|
||||||
|
("Function" @type)
|
||||||
|
|
||||||
; properties
|
; properties
|
||||||
; TODO: add method/call_expression to grammar and
|
; TODO: add method/call_expression to grammar and
|
||||||
; distinguish method call from variable access
|
; distinguish method call from variable access
|
||||||
|
|
@ -151,9 +152,9 @@
|
||||||
|
|
||||||
; Reserved words (cannot be used as identifiers)
|
; Reserved words (cannot be used as identifiers)
|
||||||
; TODO: "rethrow" @keyword
|
; TODO: "rethrow" @keyword
|
||||||
|
|
||||||
[
|
[
|
||||||
; "assert"
|
; "assert"
|
||||||
|
(case_builtin)
|
||||||
"class"
|
"class"
|
||||||
"enum"
|
"enum"
|
||||||
"extends"
|
"extends"
|
||||||
|
|
@ -178,7 +179,6 @@
|
||||||
"dynamic"
|
"dynamic"
|
||||||
"external"
|
"external"
|
||||||
"factory"
|
"factory"
|
||||||
"Function"
|
|
||||||
"get"
|
"get"
|
||||||
"implements"
|
"implements"
|
||||||
"interface"
|
"interface"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue