fix: adjust highlight order

This commit is contained in:
disrupted 2025-03-11 22:47:55 +01:00
parent 11d2f67baa
commit 91dc01d82e
No known key found for this signature in database

View file

@ -35,31 +35,6 @@
function: (identifier) @_func))
(#any-of? @_func "TypeVar" "NewType"))
; Decorators
((decorator
"@" @attribute)
(#set! priority 101))
(decorator
(identifier) @attribute)
(decorator
(attribute
attribute: (identifier) @attribute))
(decorator
(call
(identifier) @attribute))
(decorator
(call
(attribute
attribute: (identifier) @attribute)))
((decorator
(identifier) @attribute.builtin)
(#any-of? @attribute.builtin "classmethod" "property" "staticmethod"))
; Builtin functions
((call
function: (identifier) @function.builtin)
@ -459,3 +434,28 @@
(string
(string_content) @string.regexp))
(#eq? @_re "re"))
; Decorators
((decorator
"@" @attribute)
(#set! priority 101))
(decorator
(identifier) @attribute)
(decorator
(attribute
attribute: (identifier) @attribute))
(decorator
(call
(identifier) @attribute))
(decorator
(call
(attribute
attribute: (identifier) @attribute)))
((decorator
(identifier) @attribute.builtin)
(#any-of? @attribute.builtin "classmethod" "property" "staticmethod"))