From d0a56e367712a6c055103adeffdff0b80c937e7c Mon Sep 17 00:00:00 2001 From: dcho Date: Wed, 19 Mar 2025 18:22:30 -0400 Subject: [PATCH] fix(python): prioritize builtin functions --- queries/python/highlights.scm | 3 ++- tests/query/highlights/python/functions.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm index 855c96dfc..21bbbf4ec 100644 --- a/queries/python/highlights.scm +++ b/queries/python/highlights.scm @@ -45,7 +45,8 @@ "input" "int" "isinstance" "issubclass" "iter" "len" "list" "locals" "map" "max" "memoryview" "min" "next" "object" "oct" "open" "ord" "pow" "print" "property" "range" "repr" "reversed" "round" "set" "setattr" "slice" "sorted" "staticmethod" "str" "sum" "super" "tuple" "type" - "vars" "zip" "__import__")) + "vars" "zip" "__import__") + (#set! priority 102)) ; Function definitions (function_definition diff --git a/tests/query/highlights/python/functions.py b/tests/query/highlights/python/functions.py index 7284d3fcc..81dedfbae 100644 --- a/tests/query/highlights/python/functions.py +++ b/tests/query/highlights/python/functions.py @@ -16,3 +16,6 @@ class Foo: Foo().method() # ^^^^^^ @function.method.call + +print() +# ^ @function.builtin