From 2ee71c1a2fa74c10692be10ae420ff0c3a02eb3c Mon Sep 17 00:00:00 2001 From: Pham Huy Hoang Date: Tue, 22 Aug 2023 09:53:11 +0900 Subject: fix(lua): use include-children instead (#5299) The root issue is fixed with neovim 0.9.2. But the current stable version is neovim 0.9.1, so partially reverts the commit to make it compatible with the current stable version. --- queries/lua/injections.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/queries/lua/injections.scm b/queries/lua/injections.scm index a426ee1b9..85c677665 100644 --- a/queries/lua/injections.scm +++ b/queries/lua/injections.scm @@ -33,10 +33,11 @@ (#lua-match? @injection.content "^%s*;+%s?query") (#set! injection.language "query")) -(comment content: (_) @injection.content - (#lua-match? @injection.content "^[-][%s]*@") +((comment) @injection.content + (#lua-match? @injection.content "^[-][-][-][%s]*@") (#set! injection.language "luadoc") - (#offset! @injection.content 0 1 0 0)) + (#set! injection.include-children) + (#offset! @injection.content 0 3 0 0)) ; string.match("123", "%d+") @@ -86,5 +87,6 @@ (#set! injection.language "luap") (#set! injection.include-children)))) -(comment content: (_) @injection.content - (#set! injection.language "comment")) +((comment) @injection.content + (#set! injection.language "comment") + (#set! injection.include-children)) -- cgit v1.2.3-70-g09d2