From 78b54eb7f6a9956d25a3911fa0dfd0cabfe2a4c5 Mon Sep 17 00:00:00 2001 From: Pham Huy Hoang Date: Wed, 3 May 2023 19:07:59 +0900 Subject: chore(injections)!: update injection syntax to 0.9 Since 0.9, @lang syntax is still available as fallback but will soon be deprecated. Because of that, new syntax should be adopted once 0.9 becomes the baseline requirements for nvim-treesitter - update health check - update doc --- queries/python/injections.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'queries/python') diff --git a/queries/python/injections.scm b/queries/python/injections.scm index 04d0eed1f..effe2ecc7 100644 --- a/queries/python/injections.scm +++ b/queries/python/injections.scm @@ -1,8 +1,10 @@ ((call function: (attribute object: (identifier) @_re) - arguments: (argument_list (string) @regex)) + arguments: (argument_list (string) @injection.content)) (#eq? @_re "re") - (#lua-match? @regex "^r.*")) + (#lua-match? @injection.content "^r.*") + (#set! injection.language "regex")) -(comment) @comment +((comment) @injection.content + (#set! injection.language "comment")) -- cgit v1.2.3-70-g09d2