fix: order highlight captures

This commit is contained in:
disrupted 2025-03-11 19:44:44 +01:00
parent 9df0fb1787
commit 66f16f70e0
No known key found for this signature in database

View file

@ -35,23 +35,6 @@
function: (identifier) @_func))
(#any-of? @_func "TypeVar" "NewType"))
; Function calls
(call
function: (identifier) @function.call)
(call
function: (attribute
attribute: (identifier) @function.method.call))
((call
function: (identifier) @constructor)
(#lua-match? @constructor "^%u"))
((call
function: (attribute
attribute: (identifier) @constructor))
(#lua-match? @constructor "^%u"))
; Decorators
((decorator
"@" @attribute)
@ -450,6 +433,23 @@
name: (identifier) @constructor)))
(#any-of? @constructor "__new__" "__init__"))
; Function calls
(call
function: (identifier) @function.call)
(call
function: (attribute
attribute: (identifier) @function.method.call))
((call
function: (identifier) @constructor)
(#lua-match? @constructor "^%u"))
((call
function: (attribute
attribute: (identifier) @constructor))
(#lua-match? @constructor "^%u"))
; Regex from the `re` module
(call
function: (attribute