mirror of
https://github.com/nvim-treesitter/nvim-treesitter
synced 2024-09-16 14:34:05 +02: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")
|
||||
(#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
|
||||
(start_tag
|
||||
(attribute
|
||||
|
|
Loading…
Reference in a new issue