mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 19:10:24 +00:00
Fix issues with syntax highlighting in elixir and heex
This commit is contained in:
parent
2a3c660d1f
commit
04430fdbd6
3 changed files with 26 additions and 16 deletions
|
@ -36,8 +36,6 @@
|
|||
|
||||
(char) @constant
|
||||
|
||||
(interpolation "#{" @punctuation.special "}" @punctuation.special) @embedded
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
[
|
||||
|
@ -146,3 +144,10 @@
|
|||
"<<"
|
||||
">>"
|
||||
] @punctuation.bracket
|
||||
|
||||
(interpolation "#{" @punctuation.special "}" @punctuation.special) @embedded
|
||||
|
||||
((sigil
|
||||
(sigil_name) @_sigil_name
|
||||
(quoted_content) @embedded)
|
||||
(#eq? @_sigil_name "H"))
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
; HEEx delimiters
|
||||
[
|
||||
"%>"
|
||||
"--%>"
|
||||
"-->"
|
||||
"/>"
|
||||
"<!"
|
||||
"<!--"
|
||||
"<"
|
||||
"<%!--"
|
||||
"<%"
|
||||
"<%#"
|
||||
"<%%="
|
||||
"<%="
|
||||
"</"
|
||||
"</:"
|
||||
"<:"
|
||||
|
@ -20,6 +14,15 @@
|
|||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"<%!--"
|
||||
"<%"
|
||||
"<%#"
|
||||
"<%%="
|
||||
"<%="
|
||||
"%>"
|
||||
] @keyword
|
||||
|
||||
; HEEx operators are highlighted as such
|
||||
"=" @operator
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
((directive (partial_expression_value) @content)
|
||||
(#set! language "elixir")
|
||||
(#set! include-children)
|
||||
(#set! combined))
|
||||
|
||||
; Regular expression_values do not need to be combined
|
||||
((directive (expression_value) @content)
|
||||
(#set! language "elixir"))
|
||||
(
|
||||
(directive
|
||||
[
|
||||
(partial_expression_value)
|
||||
(expression_value)
|
||||
(ending_expression_value)
|
||||
] @content)
|
||||
(#set! language "elixir")
|
||||
(#set! combined)
|
||||
)
|
||||
|
||||
; expressions live within HTML tags, and do not need to be combined
|
||||
; <link href={ Routes.static_path(..) } />
|
||||
|
|
Loading…
Reference in a new issue