refactor: remove include-children from queries (#5226)

These `include-children` were to alleviate an issue with empty range language tree, which has been fixed for Neovim nightly/Neovim 0.9.2
This commit is contained in:
Pham Huy Hoang 2023-09-12 15:36:50 +09:00 committed by GitHub
parent 15d327fe63
commit bfb4601f48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 58 deletions

View file

@ -8,15 +8,13 @@
(raw_text) @injection.content)
(#eq? @_attr "lang")
(#any-of? @_lang "scss" "postcss" "less")
(#set! injection.language "scss")
(#set! injection.include-children))
(#set! injection.language "scss"))
([
(raw_text_expr)
(raw_text_each)
] @injection.content
(#set! injection.language "javascript")
(#set! injection.include-children))
(#set! injection.language "javascript"))
((script_element
(start_tag
@ -26,8 +24,7 @@
(raw_text) @injection.content)
(#eq? @_attr "lang")
(#any-of? @_lang "ts" "typescript")
(#set! injection.language "typescript")
(#set! injection.include-children))
(#set! injection.language "typescript"))
((element
(start_tag
@ -37,5 +34,4 @@
(attribute_value) @injection.language)))
(text) @injection.content)
(#eq? @_attr "lang")
(#eq? @injection.language "pug")
(#set! injection.include-children))
(#eq? @injection.language "pug"))