aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-12-28 18:20:34 +0100
committerThomas Vigouroux <tomvig38@gmail.com>2021-01-03 19:05:38 +0100
commitd9105e00a6cc6ec03f37f01f129d3d5882c84a67 (patch)
tree852865755584075a852a4cc7832bd53c98942efc
parentRegex highlights: Add constant highlight for class_character (diff)
downloadnvim-treesitter-d9105e00a6cc6ec03f37f01f129d3d5882c84a67.tar
nvim-treesitter-d9105e00a6cc6ec03f37f01f129d3d5882c84a67.tar.gz
nvim-treesitter-d9105e00a6cc6ec03f37f01f129d3d5882c84a67.tar.bz2
nvim-treesitter-d9105e00a6cc6ec03f37f01f129d3d5882c84a67.tar.lz
nvim-treesitter-d9105e00a6cc6ec03f37f01f129d3d5882c84a67.tar.xz
nvim-treesitter-d9105e00a6cc6ec03f37f01f129d3d5882c84a67.tar.zst
nvim-treesitter-d9105e00a6cc6ec03f37f01f129d3d5882c84a67.zip
Python highlights: Add regex injections: re.match(r"...")
-rw-r--r--CONTRIBUTING.md1
-rw-r--r--queries/python/injections.scm6
2 files changed, 6 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a406ec85d..08d4237e5 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -114,7 +114,6 @@ are optional and will not have any effect for now.
@constant.macro
@string
@string.regex
-@string.regex-classchar
@string.escape
@string.special
@character
diff --git a/queries/python/injections.scm b/queries/python/injections.scm
new file mode 100644
index 000000000..feec13f73
--- /dev/null
+++ b/queries/python/injections.scm
@@ -0,0 +1,6 @@
+((call
+ function: (attribute
+ object: (identifier) @_re)
+ arguments: (argument_list (string) @regex))
+ (#eq? @_re "re")
+ (#match? @regex "^r.*"))