Closed connorlay closed 2 years ago
This is a bit off-topic for this PR, but what do you think about using @keyword
for the captures of the templating tokens:
; https://github.com/the-mikedavis/helix/blob/b2e8c9188e83c95adf5e5cb9d63b487686d7f610/runtime/queries/heex/highlights.scm#L20-L28
; Non-comment or tag delimiters
[
"{"
"}"
"<%"
"<%="
"<%%="
"%>"
] @keyword
@keyword
is a bit "loud" depending on how the capture is themed but it's in line with the ERB/EJS highlights: https://github.com/tree-sitter/tree-sitter-embedded-template/blob/d21df11b0ecc6fd211dbe11278e92ef67bd17e97/queries/highlights.scm
See https://github.com/elixir-lang/tree-sitter-elixir/issues/2 and https://github.com/connorlay/tree-sitter-heex/pull/11
This PR adds tree-sitter-heex language injection into
~H
sigils provided by Phoenix Live View.Here is an example of syntax highlighting of https://github.com/fly-apps/live_beats/blob/master/lib/live_beats_web/live/layout_component.ex: