From 66f16f70e061c7688333a95c33d07fcc040848ad Mon Sep 17 00:00:00 2001 From: disrupted Date: Tue, 11 Mar 2025 19:44:44 +0100 Subject: [PATCH] fix: order highlight captures --- queries/python/highlights.scm | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm index d0759e26b..f3824a553 100644 --- a/queries/python/highlights.scm +++ b/queries/python/highlights.scm @@ -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