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/glsl/injections.scm | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'queries/glsl') diff --git a/queries/glsl/injections.scm b/queries/glsl/injections.scm index 6d022021d..f9061052c 100644 --- a/queries/glsl/injections.scm +++ b/queries/glsl/injections.scm @@ -1,6 +1,15 @@ -((preproc_def (preproc_arg) @glsl) - (#lua-match? @glsl "\n")) -(preproc_function_def (preproc_arg) @glsl) -(preproc_call (preproc_arg) @glsl) +((preproc_def + (preproc_arg) @injection.content) + (#lua-match? @injection.content "\n") + (#set! injection.language "glsl")) -(comment) @comment +(preproc_function_def + (preproc_arg) @injection.content + (#set! injection.language "glsl")) + +(preproc_call + (preproc_arg) @injection.content + (#set! injection.language "glsl")) + +((comment) @injection.content + (#set! injection.language "comment")) -- cgit v1.2.3-70-g09d2