aboutsummaryrefslogtreecommitdiffstats
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
parentMerge pull request #90 from kyazdani42/fix/parser-names-as-filetypes (diff)
parentAdd highlighting of dunder identifiers (e.g. __all__, __add__) to Python high... (diff)
downloadnvim-treesitter-b84fde9718f4f75f2515f8ac5d73cf91c716c4aa.tar
nvim-treesitter-b84fde9718f4f75f2515f8ac5d73cf91c716c4aa.tar.gz
nvim-treesitter-b84fde9718f4f75f2515f8ac5d73cf91c716c4aa.tar.bz2
nvim-treesitter-b84fde9718f4f75f2515f8ac5d73cf91c716c4aa.tar.lz
nvim-treesitter-b84fde9718f4f75f2515f8ac5d73cf91c716c4aa.tar.xz
nvim-treesitter-b84fde9718f4f75f2515f8ac5d73cf91c716c4aa.tar.zst
nvim-treesitter-b84fde9718f4f75f2515f8ac5d73cf91c716c4aa.zip
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 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