mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 17:36:19 +04:00
Improve HEEx comment highlights, inject comment lang (#3170)
This commit is contained in:
parent
dfc31e74af
commit
ec85fb9ab6
@ -2,14 +2,10 @@
|
|||||||
; HEEx delimiters
|
; HEEx delimiters
|
||||||
[
|
[
|
||||||
"<!"
|
"<!"
|
||||||
"<!--"
|
|
||||||
"<"
|
"<"
|
||||||
"<%!--"
|
|
||||||
"<%#"
|
"<%#"
|
||||||
">"
|
">"
|
||||||
"</"
|
"</"
|
||||||
"--%>"
|
|
||||||
"-->"
|
|
||||||
"/>"
|
"/>"
|
||||||
; These could be `@keyword`s but the closing `>` wouldn't be highlighted
|
; These could be `@keyword`s but the closing `>` wouldn't be highlighted
|
||||||
; as `@keyword`
|
; as `@keyword`
|
||||||
@ -34,7 +30,13 @@
|
|||||||
(doctype) @constant
|
(doctype) @constant
|
||||||
|
|
||||||
; HEEx comments are highlighted as such
|
; HEEx comments are highlighted as such
|
||||||
(comment) @comment
|
[
|
||||||
|
"<!--"
|
||||||
|
"-->"
|
||||||
|
"<%!--"
|
||||||
|
"--%>"
|
||||||
|
(comment)
|
||||||
|
] @comment
|
||||||
|
|
||||||
; HEEx tags are highlighted as HTML
|
; HEEx tags are highlighted as HTML
|
||||||
(tag_name) @tag
|
(tag_name) @tag
|
||||||
|
@ -19,3 +19,6 @@
|
|||||||
; <link href={ Routes.static_path(..) } />
|
; <link href={ Routes.static_path(..) } />
|
||||||
((expression (expression_value) @injection.content)
|
((expression (expression_value) @injection.content)
|
||||||
(#set! injection.language "elixir"))
|
(#set! injection.language "elixir"))
|
||||||
|
|
||||||
|
((comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
Loading…
Reference in New Issue
Block a user