diff --git a/Cargo.lock b/Cargo.lock index 95eb4c3f03659e..f9ce7f8e0b8fb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14899,13 +14899,6 @@ dependencies = [ "zed_extension_api 0.1.0", ] -[[package]] -name = "zed_svelte" -version = "0.2.1" -dependencies = [ - "zed_extension_api 0.1.0", -] - [[package]] name = "zed_terraform" version = "0.1.1" diff --git a/Cargo.toml b/Cargo.toml index 2dd14c351a42fd..b86b999cf15bb1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -159,7 +159,6 @@ members = [ "extensions/ruff", "extensions/slash-commands-example", "extensions/snippets", - "extensions/svelte", "extensions/terraform", "extensions/test-extension", "extensions/toml", diff --git a/extensions/svelte/.gitignore b/extensions/svelte/.gitignore deleted file mode 100644 index 6aba30215ee94f..00000000000000 --- a/extensions/svelte/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -target -*.wasm -grammars diff --git a/extensions/svelte/Cargo.toml b/extensions/svelte/Cargo.toml deleted file mode 100644 index d410c4b70e9f91..00000000000000 --- a/extensions/svelte/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "zed_svelte" -version = "0.2.1" -edition = "2021" -publish = false -license = "Apache-2.0" - -[lints] -workspace = true - -[lib] -path = "src/svelte.rs" -crate-type = ["cdylib"] - -[dependencies] -zed_extension_api = "0.1.0" diff --git a/extensions/svelte/LICENSE-APACHE b/extensions/svelte/LICENSE-APACHE deleted file mode 120000 index 1cd601d0a3affa..00000000000000 --- a/extensions/svelte/LICENSE-APACHE +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE-APACHE \ No newline at end of file diff --git a/extensions/svelte/extension.toml b/extensions/svelte/extension.toml deleted file mode 100644 index fce1432ea9aa75..00000000000000 --- a/extensions/svelte/extension.toml +++ /dev/null @@ -1,15 +0,0 @@ -id = "svelte" -name = "Svelte" -description = "Svelte support" -version = "0.2.1" -schema_version = 1 -authors = [] -repository = "https://github.com/zed-extensions/svelte" - -[language_servers.svelte-language-server] -name = "Svelte Language Server" -language = "Svelte" - -[grammars.svelte] -repository = "https://github.com/tree-sitter-grammars/tree-sitter-svelte" -commit = "3f06f705410683adb17d146b5eca28c62fe81ba6" diff --git a/extensions/svelte/languages/svelte/brackets.scm b/extensions/svelte/languages/svelte/brackets.scm deleted file mode 100644 index deb34f80a806ff..00000000000000 --- a/extensions/svelte/languages/svelte/brackets.scm +++ /dev/null @@ -1,7 +0,0 @@ -("<" @open ">" @close) -("{" @open "}" @close) -("'" @open "'" @close) -("\"" @open "\"" @close) -("(" @open ")" @close) -; ("[" @open "]" @close) -; ("`" @open "`" @close) diff --git a/extensions/svelte/languages/svelte/config.toml b/extensions/svelte/languages/svelte/config.toml deleted file mode 100644 index 4db968be8c8f64..00000000000000 --- a/extensions/svelte/languages/svelte/config.toml +++ /dev/null @@ -1,22 +0,0 @@ -name = "Svelte" -grammar = "svelte" -path_suffixes = ["svelte"] -block_comment = [""] -autoclose_before = ":\"'}]>" -brackets = [ - { start = "{", end = "}", close = true, newline = true }, - { start = "<", end = ">", close = true, newline = true, not_in = ["string"] }, - { start = "[", end = "]", close = true, newline = true }, - { start = "(", end = ")", close = true, newline = true }, - { start = "!--", end = " --", close = true, newline = true }, - { start = "\"", end = "\"", close = true, newline = true, not_in = ["string"] }, - { start = "'", end = "'", close = true, newline = true, not_in = ["string"] }, - { start = "`", end = "`", close = true, newline = true, not_in = ["string"] }, -] -scope_opt_in_language_servers = ["tailwindcss-language-server"] -prettier_parser_name = "svelte" -prettier_plugins = ["prettier-plugin-svelte"] - -[overrides.string] -word_characters = ["-"] -opt_into_language_servers = ["tailwindcss-language-server"] diff --git a/extensions/svelte/languages/svelte/highlights.scm b/extensions/svelte/languages/svelte/highlights.scm deleted file mode 100755 index cd3a08921ee64c..00000000000000 --- a/extensions/svelte/languages/svelte/highlights.scm +++ /dev/null @@ -1,108 +0,0 @@ - -; comments -(comment) @comment - -; property attribute -(attribute_directive) @attribute.function -(attribute_identifier) @attribute -(attribute_modifier) @attribute.special - -; Style component attributes as @property -(start_tag - ( - (tag_name) @_tag_name - (#match? @_tag_name "^[A-Z]") - ) - (attribute - (attribute_name - (attribute_identifier) @tag.property - ) - ) -) - -; Style self-closing component attributes as @tag.property -(self_closing_tag - ( - (tag_name) @_tag_name - (#match? @_tag_name "^[A-Z]") - ) - (attribute - (attribute_name - (attribute_identifier) @tag.property - ) - ) -) - - -; style elements starting with lowercase letters as tags -( - (tag_name) @tag - (#match? @tag "^[a-z]") -) - -; style elements starting with uppercase letters as components (types) -; Also valid might be to treat them as constructors -( - (tag_name) @tag @tag.component.type.constructor - (#match? @tag "^[A-Z]") -) - -[ - "<" - ">" - "" -] @tag.punctuation.bracket - - -[ - "{" - "}" -] @punctuation.bracket - -[ - "|" -] @punctuation.delimiter - - -[ - "@" - "#" - ":" - "/" -] @tag.punctuation.special - -"=" @operator - - -; Treating (if, each, ...) as a keyword inside of blocks -; like {#if ...} or {#each ...} -(block_start_tag - tag: _ @keyword -) - -(block_tag - tag: _ @keyword -) - -(block_end_tag - tag: _ @keyword -) - -(expression_tag - tag: _ @keyword -) - -; Style quoted string attribute values -(quoted_attribute_value) @string - - -; Highlight the `as` keyword in each blocks -(each_start - ("as") @tag.keyword -) - - -; Highlight the snippet name as a function -; (e.g. {#snippet foo(bar)} -(snippet_name) @function diff --git a/extensions/svelte/languages/svelte/indents.scm b/extensions/svelte/languages/svelte/indents.scm deleted file mode 100755 index 89082e1a505387..00000000000000 --- a/extensions/svelte/languages/svelte/indents.scm +++ /dev/null @@ -1,9 +0,0 @@ -[ - (element) - (if_statement) - (each_statement) - (await_statement) - (snippet_statement) - (script_element) - (style_element) -] @indent diff --git a/extensions/svelte/languages/svelte/injections.scm b/extensions/svelte/languages/svelte/injections.scm deleted file mode 100755 index c3b7f088d6e4af..00000000000000 --- a/extensions/svelte/languages/svelte/injections.scm +++ /dev/null @@ -1,84 +0,0 @@ -; ; injections.scm -; ; -------------- - -; Match script tags with a lang attribute -(script_element - (start_tag - (attribute - (attribute_name) @_attr_name - (#eq? @_attr_name "lang") - (quoted_attribute_value - (attribute_value) @language - ) - ) - ) - (raw_text) @content -) - -; Match script tags without a lang attribute -(script_element - (start_tag - (attribute - (attribute_name) @_attr_name - )* - ) - (raw_text) @content - (#not-any-of? @_attr_name "lang") - (#set! language "javascript") -) - -; Match the contents of the script's generics="T extends string" as typescript code -; -; Disabled for the time-being because tree-sitter is treating the generics -; attribute as a top-level typescript statement, where `T extends string` is -; not a valid top-level typescript statement. -; -; (script_element -; (start_tag -; (attribute -; (attribute_name) @_attr_name -; (#eq? @_attr_name "generics") -; (quoted_attribute_value -; (attribute_value) @content -; ) -; ) -; ) -; (#set! language "typescript") -; ) - - -; Mark everything as typescript because it's -; a more generic superset of javascript -; Not sure if it's possible to somehow refer to the -; script's language attribute here. -((svelte_raw_text) @content - (#set! "language" "ts") -) - -; Match