Files
helix/runtime/queries/templ/injections.scm
mayandGitHub 5a3edd585e feat(templ): improve the queries (#15668)
* chore(lang/go): update source to the latest revision

* chore(lang/templ): update source to the newest revision

* feat(tags/templ): add tags query

* feat(injections/templ): inherit from go, inject comment

* feat(textobjects/templ): add textobject queries

inherit from go and add the additional templ-only textobject queries for
`@comment` and `@function`.

* fix(highlights/templ): fix and align templ highlight queries

- only mark the names of tags as `@tag`
- also correctly highlight the script tag
- mark <, </, >, /> as `@punctuation.bracket`
- don't mark interpolation expressions as `@function.member`
- highlight {{ and }} as brackets
- mark css properties as members like the css highlights do
- don't highlight the (element_text) nodes
- remove duplicate tags from the go queries

* feat(highlights/templ): add special highlighting to specific elements

this is mostly taken from the html queries, but adjusted to the templ
queries.

* feat(rainbows/templ): add rainbow queries

* chore: cargo xtask docgen
2026-07-04 12:28:19 -05:00

14 lines
342 B
Scheme

; inherits: go
((element_comment) @injection.content
(#set! injection.language "comment"))
((script_block_text) @injection.content
(#set! injection.language "javascript"))
((script_element_text) @injection.content
(#set! injection.language "javascript"))
((style_element_text) @injection.content
(#set! injection.language "css"))