aboutsummaryrefslogtreecommitdiffstats
path: root/queries/python
diff options
context:
space:
mode:
authordcho <dcho.null@gmail.com>2025-03-19 18:39:43 -0400
committerChristian Clason <ch.clason+github@icloud.com>2025-03-21 08:58:45 +0100
commitbc728ecf253d7cbf1aef9eacac2f5341827856c5 (patch)
tree7e6a5ec47e81104268b6b00aa6898ea0bdd17aef /queries/python
parentfix(python): prioritize builtin functions (diff)
downloadnvim-treesitter-bc728ecf253d7cbf1aef9eacac2f5341827856c5.tar
nvim-treesitter-bc728ecf253d7cbf1aef9eacac2f5341827856c5.tar.gz
nvim-treesitter-bc728ecf253d7cbf1aef9eacac2f5341827856c5.tar.bz2
nvim-treesitter-bc728ecf253d7cbf1aef9eacac2f5341827856c5.tar.lz
nvim-treesitter-bc728ecf253d7cbf1aef9eacac2f5341827856c5.tar.xz
nvim-treesitter-bc728ecf253d7cbf1aef9eacac2f5341827856c5.tar.zst
nvim-treesitter-bc728ecf253d7cbf1aef9eacac2f5341827856c5.zip
Use order instead of priority
Diffstat (limited to 'queries/python')
-rw-r--r--queries/python/highlights.scm25
1 files changed, 12 insertions, 13 deletions
diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm
index 21bbbf4ec..84b29412a 100644
--- a/queries/python/highlights.scm
+++ b/queries/python/highlights.scm
@@ -35,19 +35,6 @@
function: (identifier) @_func))
(#any-of? @_func "TypeVar" "NewType"))
-; Builtin functions
-((call
- function: (identifier) @function.builtin)
- (#any-of? @function.builtin
- "abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray" "bytes" "callable" "chr"
- "classmethod" "compile" "complex" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "exec"
- "filter" "float" "format" "frozenset" "getattr" "globals" "hasattr" "hash" "help" "hex" "id"
- "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__")
- (#set! priority 102))
-
; Function definitions
(function_definition
name: (identifier) @function)
@@ -426,6 +413,18 @@
attribute: (identifier) @constructor))
(#lua-match? @constructor "^%u"))
+; Builtin functions
+((call
+ function: (identifier) @function.builtin)
+ (#any-of? @function.builtin
+ "abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray" "bytes" "callable" "chr"
+ "classmethod" "compile" "complex" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "exec"
+ "filter" "float" "format" "frozenset" "getattr" "globals" "hasattr" "hash" "help" "hex" "id"
+ "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__"))
+
; Regex from the `re` module
(call
function: (attribute