summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Vigouroux <39092278+vigoux@users.noreply.github.com>2020-06-21 19:46:23 +0200
committerGitHub <noreply@github.com>2020-06-21 19:46:23 +0200
commitb84fde9718f4f75f2515f8ac5d73cf91c716c4aa (patch)
tree06af1972e327d6fd632378f419cced0c05849314
parent2c81ec391877de7c1b0b316299b57ce4ae2e88de (diff)
parenta85cf1a47c0acc6b22ed99b3228c827f5fb46927 (diff)
Merge pull request #96 from theHamsta/python-__dunder__
Add highlighting of dunder identifiers (e.g. __all__, __add__) to Python highlights
-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 cc11a5bd..c5689780 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