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.
This commit is contained in:
Pham Huy Hoang 2023-08-22 09:53:11 +09:00 committed by GitHub
parent 46dee161d3
commit 2ee71c1a2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))