mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-09 15:00: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
|
|
@ -1,15 +1,24 @@
|
|||
; Identifiers
|
||||
|
||||
((identifier) @constant (#match? @constant "^[A-Z][A-Z\\d_]+$"))
|
||||
|
||||
(namespaced_identifier
|
||||
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: [
|
||||
((identifier) @constructor (#match? @constructor "^[A-Z]*[a-z]+"))
|
||||
((identifier) @constant (#match? @constant "^[A-Z][A-Z_]*"))
|
||||
; Lowercased are variables, camel cased are types
|
||||
; ((identifier) @parameter (#match? @parameter "^[a-z]"))
|
||||
((identifier) @type (#match? @type "^[A-Z]+[a-z]+$"))
|
||||
(_)
|
||||
]
|
||||
)
|
||||
|
||||
((identifier) @constructor (#match? @constructor "^[A-Z]*[a-z]+"))
|
||||
|
||||
; Pointers
|
||||
|
||||
(address_of_identifier "&" @symbol)
|
||||
|
|
@ -155,9 +164,6 @@
|
|||
name: [
|
||||
(identifier) @method
|
||||
(generic_identifier (_) @type)
|
||||
(namespaced_identifier
|
||||
(_) @method .
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
|
|
@ -165,9 +171,13 @@
|
|||
identifier: [
|
||||
(identifier) @method
|
||||
(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