aboutsummaryrefslogtreecommitdiffstats
path: root/queries/python/highlights.scm
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-06-21 17:00:17 +0200
committerStephan Seitz <stephan.seitz@fau.de>2020-06-21 17:00:17 +0200
commita85cf1a47c0acc6b22ed99b3228c827f5fb46927 (patch)
tree7980c48170bdd0000ed1ee6a47a3b545045f31ef /queries/python/highlights.scm
parentMerge pull request #72 from doubleloop/python (diff)
downloadnvim-treesitter-a85cf1a47c0acc6b22ed99b3228c827f5fb46927.tar
nvim-treesitter-a85cf1a47c0acc6b22ed99b3228c827f5fb46927.tar.gz
nvim-treesitter-a85cf1a47c0acc6b22ed99b3228c827f5fb46927.tar.bz2
nvim-treesitter-a85cf1a47c0acc6b22ed99b3228c827f5fb46927.tar.lz
nvim-treesitter-a85cf1a47c0acc6b22ed99b3228c827f5fb46927.tar.xz
nvim-treesitter-a85cf1a47c0acc6b22ed99b3228c827f5fb46927.tar.zst
nvim-treesitter-a85cf1a47c0acc6b22ed99b3228c827f5fb46927.zip
Add highlighting of dunder identifiers (e.g. __all__, __add__) to Python highlights
Diffstat (limited to 'queries/python/highlights.scm')
-rw-r--r--queries/python/highlights.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm
index cc11a5bd2..c56897804 100644
--- a/queries/python/highlights.scm
+++ b/queries/python/highlights.scm
@@ -9,6 +9,9 @@
((identifier) @constant
(match? @constant "^[A-Z][A-Z_0-9]*$"))
+((identifier) @constant.builtin
+ (match? @constant.builtin "^__[a-zA-Z0-9_]*__$"))
+
; Function calls
(decorator) @function