mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 21:40:03 -04:00
feat: add py-script injections for html
This commit is contained in:
parent
195a0cda1a
commit
da79f9afe6
1 changed files with 23 additions and 0 deletions
|
|
@ -1 +1,24 @@
|
|||
; inherits html_tags
|
||||
|
||||
(element
|
||||
(start_tag
|
||||
(tag_name) @_py_script)
|
||||
(text) @python
|
||||
(#any-of? @_py_script "py-script" "py-repl"))
|
||||
|
||||
(script_element
|
||||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @_attr
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @_type)))
|
||||
(raw_text) @python
|
||||
(#eq? @_attr "type")
|
||||
; not adding type="py" here as it's handled by html_tags
|
||||
(#any-of? @_type "pyscript" "py-script"))
|
||||
|
||||
(element
|
||||
(start_tag
|
||||
(tag_name) @_py_config)
|
||||
(text) @toml
|
||||
(#eq? @_py_config "py-config"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue