diff --git a/Cargo.lock b/Cargo.lock index 33881ea217..080a21e5c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16996,13 +16996,6 @@ dependencies = [ "serde", ] -[[package]] -name = "zed_elixir" -version = "0.1.4" -dependencies = [ - "zed_extension_api 0.2.0", -] - [[package]] name = "zed_emmet" version = "0.0.3" @@ -17028,17 +17021,6 @@ dependencies = [ "wit-bindgen", ] -[[package]] -name = "zed_extension_api" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd16b8b30a9dc920fc1678ff852f696b5bdf5b5843bc745a128be0aac29859e" -dependencies = [ - "serde", - "serde_json", - "wit-bindgen", -] - [[package]] name = "zed_extension_api" version = "0.3.0" diff --git a/Cargo.toml b/Cargo.toml index aede683dcf..df9b8c8466 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -168,7 +168,6 @@ members = [ # Extensions # - "extensions/elixir", "extensions/emmet", "extensions/erlang", "extensions/glsl", diff --git a/docs/src/languages/elixir.md b/docs/src/languages/elixir.md index 29cdc09bbf..175d0d2e8c 100644 --- a/docs/src/languages/elixir.md +++ b/docs/src/languages/elixir.md @@ -1,6 +1,6 @@ # Elixir -Elixir support is available through the [Elixir extension](https://github.com/zed-industries/zed/tree/main/extensions/elixir). +Elixir support is available through the [Elixir extension](https://github.com/zed-extensions/elixir). - Tree-sitter: - [elixir-lang/tree-sitter-elixir](https://github.com/elixir-lang/tree-sitter-elixir) diff --git a/extensions/elixir/Cargo.toml b/extensions/elixir/Cargo.toml deleted file mode 100644 index 79b3a30ad2..0000000000 --- a/extensions/elixir/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "zed_elixir" -version = "0.1.4" -edition.workspace = true -publish.workspace = true -license = "Apache-2.0" - -[lints] -workspace = true - -[lib] -path = "src/elixir.rs" -crate-type = ["cdylib"] - -[dependencies] -zed_extension_api = "0.2.0" diff --git a/extensions/elixir/LICENSE-APACHE b/extensions/elixir/LICENSE-APACHE deleted file mode 120000 index 1cd601d0a3..0000000000 --- a/extensions/elixir/LICENSE-APACHE +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE-APACHE \ No newline at end of file diff --git a/extensions/elixir/extension.toml b/extensions/elixir/extension.toml deleted file mode 100644 index 01dd6055fa..0000000000 --- a/extensions/elixir/extension.toml +++ /dev/null @@ -1,27 +0,0 @@ -id = "elixir" -name = "Elixir" -description = "Elixir support." -version = "0.1.4" -schema_version = 1 -authors = ["Marshall Bowers "] -repository = "https://github.com/zed-industries/zed" - -[language_servers.elixir-ls] -name = "ElixirLS" -languages = ["Elixir", "HEEX"] - -[language_servers.next-ls] -name = "Next LS" -languages = ["Elixir", "HEEX"] - -[language_servers.lexical] -name = "Lexical" -languages = ["Elixir", "HEEX"] - -[grammars.elixir] -repository = "https://github.com/elixir-lang/tree-sitter-elixir" -commit = "a2861e88a730287a60c11ea9299c033c7d076e30" - -[grammars.heex] -repository = "https://github.com/phoenixframework/tree-sitter-heex" -commit = "2e1348c3cf2c9323e87c2744796cf3f3868aa82a" diff --git a/extensions/elixir/languages/elixir/brackets.scm b/extensions/elixir/languages/elixir/brackets.scm deleted file mode 100644 index d8713187e2..0000000000 --- a/extensions/elixir/languages/elixir/brackets.scm +++ /dev/null @@ -1,5 +0,0 @@ -("(" @open ")" @close) -("[" @open "]" @close) -("{" @open "}" @close) -("\"" @open "\"" @close) -("do" @open "end" @close) diff --git a/extensions/elixir/languages/elixir/config.toml b/extensions/elixir/languages/elixir/config.toml deleted file mode 100644 index a0673089dd..0000000000 --- a/extensions/elixir/languages/elixir/config.toml +++ /dev/null @@ -1,18 +0,0 @@ -name = "Elixir" -grammar = "elixir" -path_suffixes = ["ex", "exs"] -line_comments = ["# "] -autoclose_before = ";:.,=}])>" -brackets = [ - { start = "{", end = "}", close = true, newline = true }, - { start = "[", end = "]", close = true, newline = true }, - { start = "(", end = ")", close = true, newline = true }, - { start = "\"", end = "\"", close = true, newline = false, not_in = ["string", "comment"] }, - { start = "'", end = "'", close = true, newline = false, not_in = ["string", "comment"] }, -] -tab_size = 2 -scope_opt_in_language_servers = ["tailwindcss-language-server"] - -[overrides.string] -word_characters = ["-"] -opt_into_language_servers = ["tailwindcss-language-server"] diff --git a/extensions/elixir/languages/elixir/embedding.scm b/extensions/elixir/languages/elixir/embedding.scm deleted file mode 100644 index 16ad20746d..0000000000 --- a/extensions/elixir/languages/elixir/embedding.scm +++ /dev/null @@ -1,27 +0,0 @@ -( - (unary_operator - operator: "@" - operand: (call - target: (identifier) @unary - (#match? @unary "^(doc)$")) - ) @context - . - (call - target: (identifier) @name - (arguments - [ - (identifier) @name - (call - target: (identifier) @name) - (binary_operator - left: (call - target: (identifier) @name) - operator: "when") - ]) - (#match? @name "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item - ) - - (call - target: (identifier) @name - (arguments (alias) @name) - (#match? @name "^(defmodule|defprotocol)$")) @item diff --git a/extensions/elixir/languages/elixir/highlights.scm b/extensions/elixir/languages/elixir/highlights.scm deleted file mode 100644 index 69e962ae39..0000000000 --- a/extensions/elixir/languages/elixir/highlights.scm +++ /dev/null @@ -1,155 +0,0 @@ -["when" "and" "or" "not" "in" "not in" "fn" "do" "end" "catch" "rescue" "after" "else"] @keyword - -(unary_operator - operator: "&" - operand: (integer) @operator) - -(operator_identifier) @operator - -(unary_operator - operator: _ @operator) - -(binary_operator - operator: _ @operator) - -(dot - operator: _ @operator) - -(stab_clause - operator: _ @operator) - -[ - (boolean) - (nil) -] @constant - -[ - (integer) - (float) -] @number - -(alias) @type - -(call - target: (dot - left: (atom) @type)) - -(char) @constant - -(escape_sequence) @string.escape - -[ - (atom) - (quoted_atom) - (keyword) - (quoted_keyword) -] @string.special.symbol - -[ - (string) - (charlist) -] @string - -(sigil - (sigil_name) @__name__ - quoted_start: _ @string - quoted_end: _ @string - (#match? @__name__ "^[sS]$")) @string - -(sigil - (sigil_name) @__name__ - quoted_start: _ @string.regex - quoted_end: _ @string.regex - (#match? @__name__ "^[rR]$")) @string.regex - -(sigil - (sigil_name) @__name__ - quoted_start: _ @string.special - quoted_end: _ @string.special) @string.special - -(identifier) @variable - -( - (identifier) @comment.unused - (#match? @comment.unused "^_") -) - -(call - target: [ - (identifier) @function - (dot - right: (identifier) @function) - ]) - -(call - target: (identifier) @keyword - (arguments - [ - (identifier) @function - (binary_operator - left: (identifier) @function - operator: "when") - (binary_operator - operator: "|>" - right: (identifier)) - ]) - (#match? @keyword "^(def|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp|defp)$")) - -(binary_operator - operator: "|>" - right: (identifier) @function) - -(call - target: (identifier) @keyword - (#match? @keyword "^(def|defdelegate|defexception|defguard|defguardp|defimpl|defmacro|defmacrop|defmodule|defn|defnp|defoverridable|defp|defprotocol|defstruct)$")) - -(call - target: (identifier) @keyword - (#match? @keyword "^(alias|case|cond|else|for|if|import|quote|raise|receive|require|reraise|super|throw|try|unless|unquote|unquote_splicing|use|with)$")) - -( - (identifier) @constant.builtin - (#match? @constant.builtin "^(__MODULE__|__DIR__|__ENV__|__CALLER__|__STACKTRACE__)$") -) - -(unary_operator - operator: "@" @comment.doc - operand: (call - target: (identifier) @__attribute__ @comment.doc - (arguments - [ - (string) - (charlist) - (sigil) - (boolean) - ] @comment.doc)) - (#match? @__attribute__ "^(moduledoc|typedoc|doc)$")) - -(comment) @comment - -[ - "%" -] @punctuation - -[ - "," - ";" -] @punctuation.delimiter - -[ - "(" - ")" - "[" - "]" - "{" - "}" - "<<" - ">>" -] @punctuation.bracket - -(interpolation "#{" @punctuation.special "}" @punctuation.special) @embedded - -((sigil - (sigil_name) @_sigil_name - (quoted_content) @embedded) - (#eq? @_sigil_name "H")) diff --git a/extensions/elixir/languages/elixir/indents.scm b/extensions/elixir/languages/elixir/indents.scm deleted file mode 100644 index ab6fc4da67..0000000000 --- a/extensions/elixir/languages/elixir/indents.scm +++ /dev/null @@ -1,6 +0,0 @@ -(call) @indent - -(_ "[" "]" @end) @indent -(_ "{" "}" @end) @indent -(_ "(" ")" @end) @indent -(_ "do" "end" @end) @indent diff --git a/extensions/elixir/languages/elixir/injections.scm b/extensions/elixir/languages/elixir/injections.scm deleted file mode 100644 index 009c82505b..0000000000 --- a/extensions/elixir/languages/elixir/injections.scm +++ /dev/null @@ -1,7 +0,0 @@ -; Phoenix HTML template - -((sigil - (sigil_name) @_sigil_name - (quoted_content) @injection.content) - (#eq? @_sigil_name "H") - (#set! injection.language "heex")) diff --git a/extensions/elixir/languages/elixir/outline.scm b/extensions/elixir/languages/elixir/outline.scm deleted file mode 100644 index 2e864136fc..0000000000 --- a/extensions/elixir/languages/elixir/outline.scm +++ /dev/null @@ -1,56 +0,0 @@ -(call - target: (identifier) @context - (arguments (alias) @name) - (#match? @context "^(defmodule|defprotocol)$")) @item - -(call - target: (identifier) @context - (arguments (_) @name)? - (#match? @context "^(setup|setup_all)$")) @item - -(call - target: (identifier) @context - (arguments (string) @name) - (#match? @context "^(describe|test)$")) @item - -(unary_operator - operator: "@" @name - operand: (call - target: (identifier) @context - (arguments - [ - (binary_operator - left: (identifier) @name) - (binary_operator - left: (call - target: (identifier) @name - (arguments - "(" @context.extra - _* @context.extra - ")" @context.extra))) - ] - ) -) -(#match? @context "^(callback|type|typep)$")) @item - -(call - target: (identifier) @context - (arguments - [ - (identifier) @name - (call - target: (identifier) @name - (arguments - "(" @context.extra - _* @context.extra - ")" @context.extra)) - (binary_operator - left: (call - target: (identifier) @name - (arguments - "(" @context.extra - _* @context.extra - ")" @context.extra)) - operator: "when") - ]) - (#match? @context "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item diff --git a/extensions/elixir/languages/elixir/overrides.scm b/extensions/elixir/languages/elixir/overrides.scm deleted file mode 100644 index 9e77c17ec5..0000000000 --- a/extensions/elixir/languages/elixir/overrides.scm +++ /dev/null @@ -1,2 +0,0 @@ -(comment) @comment.inclusive -[(string) (charlist)] @string diff --git a/extensions/elixir/languages/elixir/runnables.scm b/extensions/elixir/languages/elixir/runnables.scm deleted file mode 100644 index 19883ec059..0000000000 --- a/extensions/elixir/languages/elixir/runnables.scm +++ /dev/null @@ -1,20 +0,0 @@ -; Macros `describe`, `test` and `property`. -; This matches the ExUnit test style. -( - (call - target: (identifier) @run (#any-of? @run "describe" "test" "property") - ) @_elixir-test - (#set! tag elixir-test) -) - -; Modules containing at least one `describe`, `test` and `property`. -; This matches the ExUnit test style. -( - (call - target: (identifier) @run (#eq? @run "defmodule") - (do_block - (call target: (identifier) @_keyword (#any-of? @_keyword "describe" "test" "property")) - ) - ) @_elixir-module-test - (#set! tag elixir-module-test) -) diff --git a/extensions/elixir/languages/elixir/tasks.json b/extensions/elixir/languages/elixir/tasks.json deleted file mode 100644 index d5026f0034..0000000000 --- a/extensions/elixir/languages/elixir/tasks.json +++ /dev/null @@ -1,30 +0,0 @@ -// Taken from https://gist.github.com/josevalim/2e4f60a14ccd52728e3256571259d493#gistcomment-4995881 -[ - { - "label": "mix test", - "command": "mix", - "args": ["test"] - }, - { - "label": "mix test --failed", - "command": "mix", - "args": ["test", "--failed"] - }, - { - "label": "mix test $ZED_RELATIVE_FILE", - "command": "mix", - "args": ["test", "$ZED_RELATIVE_FILE"], - "tags": ["elixir-module-test"] - }, - { - "label": "mix test $ZED_RELATIVE_FILE:$ZED_ROW", - "command": "mix", - "args": ["test", "$ZED_RELATIVE_FILE:$ZED_ROW"], - "tags": ["elixir-test"] - }, - { - "label": "Elixir: break line", - "command": "iex", - "args": ["-S", "mix", "test", "-b", "$ZED_RELATIVE_FILE:$ZED_ROW"] - } -] diff --git a/extensions/elixir/languages/elixir/textobjects.scm b/extensions/elixir/languages/elixir/textobjects.scm deleted file mode 100644 index da111a1165..0000000000 --- a/extensions/elixir/languages/elixir/textobjects.scm +++ /dev/null @@ -1,46 +0,0 @@ -(call - target: ((identifier) @_identifier - (#any-of? @_identifier "defmodule" "defprotocol" "defimpl")) - (do_block - "do" - (_)* @class.inside - "end")) @class.around - -(anonymous_function - (stab_clause - right: (body) @function.inside)) @function.around - -(call - target: ((identifier) @_identifier - (#any-of? @_identifier "def" "defmacro" "defmacrop" "defn" "defnp" "defp")) - (do_block - "do" - (_)* @function.inside - "end")) @function.around - -(call - target: ((identifier) @_identifier - (#any-of? @_identifier "def" "defmacro" "defmacrop" "defn" "defnp" "defp")) - (arguments - (_) - (keywords - (pair - value: (_) @function.inside)))) @function.around - -(call - target: ((identifier) @_identifier - (#any-of? @_identifier "defdelegate" "defguard" "defguardp"))) @function.around - -(comment) @comment.around - -(unary_operator - operator: "@" - operand: (call - target: ((identifier) @_identifier - (#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc")) - (arguments - [ - (keywords) @comment.inside - (string - (quoted_content) @comment.inside) - ]))) @comment.around diff --git a/extensions/elixir/languages/heex/config.toml b/extensions/elixir/languages/heex/config.toml deleted file mode 100644 index c28ffa16b0..0000000000 --- a/extensions/elixir/languages/heex/config.toml +++ /dev/null @@ -1,13 +0,0 @@ -name = "HEEX" -grammar = "heex" -path_suffixes = ["heex"] -autoclose_before = ">})" -brackets = [ - { start = "<", end = ">", close = true, newline = true }, -] -block_comment = ["<%!-- ", " --%>"] -scope_opt_in_language_servers = ["tailwindcss-language-server"] - -[overrides.string] -word_characters = ["-"] -opt_into_language_servers = ["tailwindcss-language-server"] diff --git a/extensions/elixir/languages/heex/highlights.scm b/extensions/elixir/languages/heex/highlights.scm deleted file mode 100644 index 9662c95524..0000000000 --- a/extensions/elixir/languages/heex/highlights.scm +++ /dev/null @@ -1,57 +0,0 @@ -; HEEx delimiters -[ - "/>" - "" - "{" - "}" -] @punctuation.bracket - -[ - "<%!--" - "<%" - "<%#" - "<%%=" - "<%=" - "%>" - "--%>" - "-->" - "