aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordcho <dcho.null@gmail.com>2025-03-19 18:22:30 -0400
committerChristian Clason <ch.clason+github@icloud.com>2025-03-21 08:58:45 +0100
commitd0a56e367712a6c055103adeffdff0b80c937e7c (patch)
tree2d975be4016d953c6b521393a6fbb6bdf9acedb7
parentci(update): block wit (ABI 15) (diff)
downloadnvim-treesitter-d0a56e367712a6c055103adeffdff0b80c937e7c.tar
nvim-treesitter-d0a56e367712a6c055103adeffdff0b80c937e7c.tar.gz
nvim-treesitter-d0a56e367712a6c055103adeffdff0b80c937e7c.tar.bz2
nvim-treesitter-d0a56e367712a6c055103adeffdff0b80c937e7c.tar.lz
nvim-treesitter-d0a56e367712a6c055103adeffdff0b80c937e7c.tar.xz
nvim-treesitter-d0a56e367712a6c055103adeffdff0b80c937e7c.tar.zst
nvim-treesitter-d0a56e367712a6c055103adeffdff0b80c937e7c.zip
fix(python): prioritize builtin functions
-rw-r--r--queries/python/highlights.scm3
-rw-r--r--tests/query/highlights/python/functions.py3
2 files changed, 5 insertions, 1 deletions
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