Upgrade to HEEx parser 0.3.0

This commit is contained in:
Clay 2022-01-23 18:09:29 -08:00 committed by Christian Clason
parent c7d5ba7212
commit 9e90866bce
4 changed files with 51 additions and 22 deletions

View file

@ -1,16 +1,13 @@
(text) @text
(comment) @comment
(doctype) @constant
; HEEx attributes are highlighted as HTML attributes
(attribute_name) @tag.attribute
(quoted_attribute_value) @string
; HEEx tag and component delimiters
[
"%>"
"--%>"
"-->"
"/>"
"<!"
"<!--"
"<"
"<%!--"
"<%"
"<%#"
"<%%="
@ -21,13 +18,34 @@
"}"
] @tag.delimiter
[
"="
] @operator
; HEEx operators
"=" @operator
; HEEx tags are highlighted as HTML
; HEEx inherits the DOCTYPE tag from HTML
(doctype) @constant
; HEEx tags are highlighted as HTML tags
(tag_name) @tag
; HEEx components are highlighted as types (Elixir modules)
(component_name) @type
; HEEx comments are highlighted as such
(comment) @comment
; HEEx text content is treated as markup
(text) @text
; Tree-sitter parser errors
(ERROR) @error
; HEEx attributes are highlighted as HTML attributes
(attribute_name) @tag.attribute
[
(attribute_value)
(quoted_attribute_value)
] @string
; HEEx components are highlighted as modules and function calls
(component_name [
(module) @type
(function) @function
"." @punctuation.delimiter
])