on master help sign in
Improve HEEx comment highlights, inject comment lang (#3170)
commitec85fb9ab6ff8a46f5a09d7e1134b153464dd08a authorClay <connorlay@users.noreply.github.com> dateSat 23 Jul 2022, 21:49 (4 years ago) parentdfc31e7
2 files changed+10−5
runtime/queries/heex/highlights.scm+7−5 runtime/queries/heex/injections.scm+3
runtime/queries/heex/highlights.scm+7−5
@@ -2,14 +2,10 @@
22; HEEx delimiters
33[
44 "<!"
5− "<!--"
65 "<"
7− "<%!--"
86 "<%#"
97 ">"
108 "</"
11− "--%>"
12− "-->"
139 "/>"
1410 ; These could be `@keyword`s but the closing `>` wouldn't be highlighted
1511 ; as `@keyword`
@@ -34,7 +30,13 @@
3430(doctype) @constant
3531
3632; HEEx comments are highlighted as such
37−(comment) @comment
33+[
34+ "<!--"
35+ "-->"
36+ "<%!--"
37+ "--%>"
38+ (comment)
39+] @comment
3840
3941; HEEx tags are highlighted as HTML
4042(tag_name) @tag
runtime/queries/heex/injections.scm+3
@@ -19,3 +19,6 @@
1919; <link href={ Routes.static_path(..) } />
2020((expression (expression_value) @injection.content)
2121 (#set! injection.language "elixir"))
22+
23+((comment) @injection.content
24+ (#set! injection.language "comment"))