Improve HEEx comment highlights, inject comment lang (#3170)

This commit is contained in:
Clay 2022-07-23 21:49:52 -05:00 committed by GitHub
parent dfc31e74af
commit ec85fb9ab6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View File

@ -2,14 +2,10 @@
; HEEx delimiters
[
"<!"
"<!--"
"<"
"<%!--"
"<%#"
">"
"</"
"--%>"
"-->"
"/>"
; These could be `@keyword`s but the closing `>` wouldn't be highlighted
; as `@keyword`
@ -34,7 +30,13 @@
(doctype) @constant
; HEEx comments are highlighted as such
(comment) @comment
[
"<!--"
"-->"
"<%!--"
"--%>"
(comment)
] @comment
; HEEx tags are highlighted as HTML
(tag_name) @tag

View File

@ -19,3 +19,6 @@
; <link href={ Routes.static_path(..) } />
((expression (expression_value) @injection.content)
(#set! injection.language "elixir"))
((comment) @injection.content
(#set! injection.language "comment"))