mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-22 01:46:29 +00:00
97dc1d193f
This PR updates the following extensions to use the `@tag.doctype` selector for highlighting HTML doctypes: - Astro - Elixir (HEEx) - HTML Additionally, it also changes the base selector for HTML tags from `@keyword` to `@tag`. | Before | After | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | <img width="308" alt="Screenshot 2024-09-18 at 2 04 41 PM" src="https://github.com/user-attachments/assets/818d98ba-fce7-4683-b67f-61c86543831c"> | <img width="358" alt="Screenshot 2024-09-18 at 2 05 00 PM" src="https://github.com/user-attachments/assets/5071db7c-e0bf-44df-8959-38275833833b"> | Extracted this from https://github.com/zed-industries/zed/pull/16723. Release Notes: - N/A --------- Co-authored-by: 狐狸 <134658521+Huliiiiii@users.noreply.github.com>
57 lines
815 B
Scheme
57 lines
815 B
Scheme
; HEEx delimiters
|
|
[
|
|
"/>"
|
|
"<!"
|
|
"<"
|
|
"</"
|
|
"</:"
|
|
"<:"
|
|
">"
|
|
"{"
|
|
"}"
|
|
] @punctuation.bracket
|
|
|
|
[
|
|
"<%!--"
|
|
"<%"
|
|
"<%#"
|
|
"<%%="
|
|
"<%="
|
|
"%>"
|
|
"--%>"
|
|
"-->"
|
|
"<!--"
|
|
] @keyword
|
|
|
|
; HEEx operators are highlighted as such
|
|
"=" @operator
|
|
|
|
; HEEx inherits the DOCTYPE tag from HTML
|
|
(doctype) @tag.doctype
|
|
|
|
(comment) @comment
|
|
|
|
; HEEx tags and slots are highlighted as HTML
|
|
[
|
|
(tag_name)
|
|
(slot_name)
|
|
] @tag
|
|
|
|
; HEEx attributes are highlighted as HTML attributes
|
|
(attribute_name) @attribute
|
|
|
|
; HEEx special attributes are highlighted as keywords
|
|
(special_attribute_name) @keyword
|
|
|
|
[
|
|
(attribute_value)
|
|
(quoted_attribute_value)
|
|
] @string
|
|
|
|
; HEEx components are highlighted as Elixir modules and functions
|
|
(component_name
|
|
[
|
|
(module) @module
|
|
(function) @function
|
|
"." @punctuation.delimiter
|
|
])
|