mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
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:
parent
46dee161d3
commit
2ee71c1a2f
1 changed files with 7 additions and 5 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue