Extract Astro support into an extension (#9835)

This PR extracts Astro support into an extension and removes the
built-in Astro support from Zed.

Release Notes:

- Removed built-in support for Astro, in favor of making it available as
an extension. The Astro extension will be suggested for download when
you open a `.astro` file.
This commit is contained in:
Marshall Bowers
2024-03-26 18:50:08 -04:00
committed by GitHub
parent 7807f23e2a
commit 3676ca879b
14 changed files with 145 additions and 157 deletions
@@ -0,0 +1,3 @@
("{" @open "}" @close)
("<" @open ">" @close)
("\"" @open "\"" @close)
@@ -0,0 +1,23 @@
name = "Astro"
grammar = "astro"
path_suffixes = ["astro"]
block_comment = ["<!-- ", " -->"]
autoclose_before = ";:.,=}])>"
brackets = [
{ start = "{", end = "}", close = true, newline = true },
{ start = "[", end = "]", close = true, newline = true },
{ start = "(", end = ")", close = true, newline = true },
{ start = "<", end = ">", close = false, newline = true, not_in = ["string", "comment"] },
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["string", "comment"] },
{ start = "'", end = "'", close = true, newline = false, not_in = ["string", "comment"] },
{ start = "`", end = "`", close = true, newline = false, not_in = ["string"] },
{ start = "/*", end = " */", close = true, newline = false, not_in = ["string", "comment"] },
]
word_characters = ["#", "$", "-"]
scope_opt_in_language_servers = ["tailwindcss-language-server"]
prettier_parser_name = "astro"
prettier_plugins = ["prettier-plugin-astro"]
[overrides.string]
word_characters = ["-"]
opt_into_language_servers = ["tailwindcss-language-server"]
@@ -0,0 +1,25 @@
(tag_name) @tag
(erroneous_end_tag_name) @keyword
(doctype) @constant
(attribute_name) @property
(attribute_value) @string
(comment) @comment
[
(attribute_value)
(quoted_attribute_value)
] @string
"=" @operator
[
"{"
"}"
] @punctuation.bracket
[
"<"
">"
"</"
"/>"
] @tag.delimiter
@@ -0,0 +1,16 @@
; inherits: html_tags
(frontmatter
(raw_text) @content
(#set! "language" "typescript"))
(interpolation
(raw_text) @content
(#set! "language" "tsx"))
(script_element
(raw_text) @content
(#set! "language" "typescript"))
(style_element
(raw_text) @content
(#set! "language" "css"))