mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 12:50:09 -04:00
feat(svelte): add javascript injection (#6540)
This commit is contained in:
parent
121d0c4c67
commit
1a4274c9e1
1 changed files with 11 additions and 0 deletions
|
|
@ -25,6 +25,17 @@
|
||||||
(#any-of? @_lang "ts" "typescript")
|
(#any-of? @_lang "ts" "typescript")
|
||||||
(#set! injection.language "typescript"))
|
(#set! injection.language "typescript"))
|
||||||
|
|
||||||
|
((script_element
|
||||||
|
(start_tag
|
||||||
|
(attribute
|
||||||
|
(attribute_name) @_attr
|
||||||
|
(quoted_attribute_value
|
||||||
|
(attribute_value) @_lang)))
|
||||||
|
(raw_text) @injection.content)
|
||||||
|
(#eq? @_attr "lang")
|
||||||
|
(#any-of? @_lang "js" "javascript")
|
||||||
|
(#set! injection.language "javascript"))
|
||||||
|
|
||||||
((element
|
((element
|
||||||
(start_tag
|
(start_tag
|
||||||
(attribute
|
(attribute
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue