nvim-treesitter/runtime/queries/html/injections.scm
Riley Bruins f2204e58db
fix: use proper ; inherits syntax in queries (#8226)
Some queries don't add a colon after the `inherits` keyword, which nvim
could handle but `ts_query_ls` could not, causing it to give incomplete
diagnostics.
2025-10-24 18:47:39 -07:00

27 lines
673 B
Scheme

; inherits: html_tags
(element
(start_tag
(tag_name) @_py_script)
(text) @injection.content
(#any-of? @_py_script "py-script" "py-repl")
(#set! injection.language "python"))
(script_element
(start_tag
(attribute
(attribute_name) @_attr
(quoted_attribute_value
(attribute_value) @_type)))
(raw_text) @injection.content
(#eq? @_attr "type")
; not adding type="py" here as it's handled by html_tags
(#any-of? @_type "pyscript" "py-script")
(#set! injection.language "python"))
(element
(start_tag
(tag_name) @_py_config)
(text) @injection.content
(#eq? @_py_config "py-config")
(#set! injection.language "toml"))