mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 09:20:04 -04:00
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:
parent
15d327fe63
commit
bfb4601f48
6 changed files with 32 additions and 58 deletions
|
|
@ -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"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue