mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Fix vue injection queries
This commit is contained in:
parent
6f9e5cdba7
commit
eaeedfb804
1 changed files with 33 additions and 2 deletions
|
|
@ -1,4 +1,35 @@
|
|||
; inherits: html_tags
|
||||
(
|
||||
(style_element
|
||||
(start_tag) @_no_lang
|
||||
(raw_text) @css)
|
||||
(#not-contains? @_no_lang "lang=")
|
||||
)
|
||||
|
||||
(
|
||||
(style_element
|
||||
(start_tag
|
||||
(attribute
|
||||
(quoted_attribute_value (attribute_value) @_lang)))
|
||||
(raw_text) @css)
|
||||
(#eq? @_lang "css")
|
||||
)
|
||||
|
||||
; if start_tag does not specify `lang="..."` then set it to javascript
|
||||
(
|
||||
(script_element
|
||||
(start_tag) @_no_lang
|
||||
(raw_text) @javascript)
|
||||
(#not-contains? @_no_lang "lang=")
|
||||
)
|
||||
|
||||
(
|
||||
(script_element
|
||||
(start_tag
|
||||
(attribute
|
||||
(quoted_attribute_value (attribute_value) @_lang)))
|
||||
(raw_text) @javascript)
|
||||
(#eq? @_lang "js")
|
||||
)
|
||||
|
||||
(
|
||||
(style_element
|
||||
|
|
@ -15,7 +46,7 @@
|
|||
(attribute
|
||||
(quoted_attribute_value (attribute_value) @_lang)))
|
||||
(raw_text) @typescript)
|
||||
(#any-of? @_lang "ts" "typescript")
|
||||
(#eq? @_lang "ts")
|
||||
)
|
||||
|
||||
((interpolation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue