mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 09:20:04 -04:00
highlights(vala): Reflect upstream refactor
This commit is contained in:
parent
cada76c490
commit
cbfa53db22
2 changed files with 20 additions and 10 deletions
|
|
@ -282,7 +282,7 @@
|
||||||
"revision": "e8e8e8dc2745840b036421b4e43286750443cb13"
|
"revision": "e8e8e8dc2745840b036421b4e43286750443cb13"
|
||||||
},
|
},
|
||||||
"vala": {
|
"vala": {
|
||||||
"revision": "4c31aa2f3c077fa69acc49e5c5a58cd87c704229"
|
"revision": "31a08784cc74b61cb10c5d8314cf8a8aa98aa9a8"
|
||||||
},
|
},
|
||||||
"verilog": {
|
"verilog": {
|
||||||
"revision": "8f6b1f357d1231c420404b5f7a368a73c25adfa2"
|
"revision": "8f6b1f357d1231c420404b5f7a368a73c25adfa2"
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,24 @@
|
||||||
|
; Identifiers
|
||||||
|
|
||||||
|
((identifier) @constant (#match? @constant "^[A-Z][A-Z\\d_]+$"))
|
||||||
|
|
||||||
(namespaced_identifier
|
(namespaced_identifier
|
||||||
left: [
|
left: [
|
||||||
(identifier) @namespace
|
; Lowercased names in lhs typically are variables, while camel cased are namespaces
|
||||||
|
; ((identifier) @namespace (#match? @namespace "^[A-Z]+[a-z]+$"))
|
||||||
|
((identifier) @variable (#match? @variable "^[a-z]"))
|
||||||
(_)
|
(_)
|
||||||
]
|
]
|
||||||
right: [
|
right: [
|
||||||
((identifier) @constructor (#match? @constructor "^[A-Z]*[a-z]+"))
|
; Lowercased are variables, camel cased are types
|
||||||
((identifier) @constant (#match? @constant "^[A-Z][A-Z_]*"))
|
; ((identifier) @parameter (#match? @parameter "^[a-z]"))
|
||||||
|
((identifier) @type (#match? @type "^[A-Z]+[a-z]+$"))
|
||||||
(_)
|
(_)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
((identifier) @constructor (#match? @constructor "^[A-Z]*[a-z]+"))
|
||||||
|
|
||||||
; Pointers
|
; Pointers
|
||||||
|
|
||||||
(address_of_identifier "&" @symbol)
|
(address_of_identifier "&" @symbol)
|
||||||
|
|
@ -155,9 +164,6 @@
|
||||||
name: [
|
name: [
|
||||||
(identifier) @method
|
(identifier) @method
|
||||||
(generic_identifier (_) @type)
|
(generic_identifier (_) @type)
|
||||||
(namespaced_identifier
|
|
||||||
(_) @method .
|
|
||||||
)
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -165,9 +171,13 @@
|
||||||
identifier: [
|
identifier: [
|
||||||
(identifier) @method
|
(identifier) @method
|
||||||
(generic_identifier (_) @type)
|
(generic_identifier (_) @type)
|
||||||
(namespaced_identifier
|
]
|
||||||
(_) @method .
|
)
|
||||||
)
|
|
||||||
|
(member_function
|
||||||
|
identifier: [
|
||||||
|
(identifier) @method
|
||||||
|
(generic_identifier (_) @type)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue