From 0f584cb353afe0483d8a044619b7dabcfcd10e40 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Fri, 23 Feb 2024 15:56:08 +0100 Subject: [PATCH] chore: Extract languages from `zed` crate (#8270) - Moves languages module from `zed` into a separate crate. That way we have less of a long pole at the end of compilation. - Removes moot dependencies on editor/picker. This is totally harmless and might help in the future if we decide to decouple picker from editor. Before: ``` Number of crates that depend on 'picker' but not on 'editor': 1 Total number of crates that depend on 'picker': 13 Total number of crates that depend on 'editor': 30 ``` After: ``` Number of crates that depend on 'picker' but not on 'editor': 5 Total number of crates that depend on 'picker': 12 Total number of crates that depend on 'editor': 26 ``` The more crates depend on just picker but not editor, the better in that case. Release Notes: - N/A --- Cargo.lock | 169 +++++++++++------- Cargo.toml | 1 + crates/command_palette/Cargo.toml | 1 - crates/diagnostics/src/diagnostics.rs | 3 - crates/editor/src/display_map.rs | 6 +- crates/editor/src/display_map/block_map.rs | 6 +- crates/editor/src/display_map/fold_map.rs | 2 +- crates/editor/src/display_map/inlay_map.rs | 4 +- crates/editor/src/display_map/tab_map.rs | 2 +- crates/editor/src/display_map/wrap_map.rs | 2 +- crates/editor/src/editor.rs | 8 +- crates/editor/src/element.rs | 4 - crates/extensions_ui/Cargo.toml | 1 - crates/languages/Cargo.toml | 89 +++++++++ crates/languages/LICENSE-GPL | 1 + .../src/languages => languages/src}/astro.rs | 0 .../src}/astro/brackets.scm | 0 .../src}/astro/config.toml | 0 .../src}/astro/highlights.scm | 0 .../src}/astro/injections.scm | 0 .../src}/bash/brackets.scm | 0 .../src}/bash/config.toml | 0 .../src}/bash/highlights.scm | 0 .../src}/bash/redactions.scm | 0 .../{zed/src/languages => languages/src}/c.rs | 2 +- .../src}/c/brackets.scm | 0 .../languages => languages/src}/c/config.toml | 0 .../src}/c/embedding.scm | 0 .../src}/c/highlights.scm | 0 .../languages => languages/src}/c/indents.scm | 0 .../src}/c/injections.scm | 0 .../languages => languages/src}/c/outline.scm | 0 .../src}/c/overrides.scm | 0 .../languages => languages/src}/clojure.rs | 0 .../src}/clojure/brackets.scm | 0 .../src}/clojure/config.toml | 0 .../src}/clojure/highlights.scm | 0 .../src}/clojure/indents.scm | 0 .../src}/clojure/outline.scm | 0 .../src}/cpp/brackets.scm | 0 .../src}/cpp/config.toml | 0 .../src}/cpp/embedding.scm | 0 .../src}/cpp/highlights.scm | 0 .../src}/cpp/indents.scm | 0 .../src}/cpp/injections.scm | 0 .../src}/cpp/outline.scm | 0 .../src}/cpp/overrides.scm | 0 .../src/languages => languages/src}/csharp.rs | 0 .../src}/csharp/config.toml | 0 .../src}/csharp/highlights.scm | 0 .../src}/csharp/injections.scm | 0 .../src}/csharp/outline.scm | 0 .../src/languages => languages/src}/css.rs | 0 .../src}/css/brackets.scm | 0 .../src}/css/config.toml | 0 .../src}/css/highlights.scm | 0 .../src}/css/indents.scm | 0 .../src}/css/overrides.scm | 0 .../src/languages => languages/src}/dart.rs | 0 .../src}/dart/brackets.scm | 0 .../src}/dart/config.toml | 0 .../src}/dart/highlights.scm | 0 .../src}/dart/indents.scm | 0 .../src}/dart/outline.scm | 0 .../src/languages => languages/src}/deno.rs | 0 .../languages => languages/src}/dockerfile.rs | 0 .../src}/dockerfile/config.toml | 0 .../src}/dockerfile/highlights.scm | 0 .../src}/dockerfile/injections.scm | 0 .../src/languages => languages/src}/elixir.rs | 0 .../src}/elixir/brackets.scm | 0 .../src}/elixir/config.toml | 0 .../src}/elixir/embedding.scm | 0 .../src}/elixir/highlights.scm | 0 .../src}/elixir/indents.scm | 0 .../src}/elixir/injections.scm | 0 .../src}/elixir/outline.scm | 0 .../src}/elixir/overrides.scm | 0 .../src/languages => languages/src}/elm.rs | 0 .../src}/elm/config.toml | 0 .../src}/elm/highlights.scm | 0 .../src}/elm/injections.scm | 0 .../src}/elm/outline.scm | 0 .../src}/erb/config.toml | 0 .../src}/erb/highlights.scm | 0 .../src}/erb/injections.scm | 0 .../src/languages => languages/src}/erlang.rs | 0 .../src}/erlang/brackets.scm | 0 .../src}/erlang/config.toml | 0 .../src}/erlang/folds.scm | 0 .../src}/erlang/highlights.scm | 0 .../src}/erlang/indents.scm | 0 .../src}/erlang/outline.scm | 0 .../src}/gitcommit/config.toml | 0 .../src}/gitcommit/highlights.scm | 0 .../src}/gitcommit/injections.scm | 0 .../src/languages => languages/src}/gleam.rs | 0 .../src}/gleam/config.toml | 0 .../src}/gleam/highlights.scm | 0 .../src}/gleam/indents.scm | 0 .../src}/gleam/outline.scm | 0 .../src}/glsl/config.toml | 0 .../src}/glsl/highlights.scm | 0 .../src/languages => languages/src}/go.rs | 2 +- .../src}/go/brackets.scm | 0 .../src}/go/config.toml | 0 .../src}/go/embedding.scm | 0 .../src}/go/highlights.scm | 0 .../src}/go/indents.scm | 0 .../src}/go/outline.scm | 0 .../src}/go/overrides.scm | 0 .../src}/gomod/config.toml | 0 .../src}/gomod/highlights.scm | 0 .../src}/gomod/structure.scm | 0 .../src}/gowork/config.toml | 0 .../src}/gowork/highlights.scm | 0 .../languages => languages/src}/haskell.rs | 0 .../src}/haskell/brackets.scm | 0 .../src}/haskell/config.toml | 0 .../src}/haskell/highlights.scm | 0 .../src}/haskell/indents.scm | 0 .../src}/haskell/outline.scm | 0 .../src}/hcl/config.toml | 0 .../src}/hcl/highlights.scm | 0 .../src}/hcl/indents.scm | 0 .../src}/hcl/injections.scm | 0 .../src}/heex/config.toml | 0 .../src}/heex/highlights.scm | 0 .../src}/heex/injections.scm | 0 .../src}/heex/overrides.scm | 0 .../src/languages => languages/src}/html.rs | 0 .../src}/html/brackets.scm | 0 .../src}/html/config.toml | 0 .../src}/html/highlights.scm | 0 .../src}/html/indents.scm | 0 .../src}/html/injections.scm | 0 .../src}/html/outline.scm | 0 .../src}/html/overrides.scm | 0 .../src}/javascript/brackets.scm | 0 .../src}/javascript/config.toml | 0 .../src}/javascript/contexts.scm | 0 .../src}/javascript/embedding.scm | 0 .../src}/javascript/highlights.scm | 0 .../src}/javascript/indents.scm | 0 .../src}/javascript/outline.scm | 0 .../src}/javascript/overrides.scm | 0 .../src/languages => languages/src}/json.rs | 0 .../src}/json/brackets.scm | 0 .../src}/json/config.toml | 0 .../src}/json/embedding.scm | 0 .../src}/json/highlights.scm | 0 .../src}/json/indents.scm | 0 .../src}/json/outline.scm | 0 .../src}/json/overrides.scm | 0 .../src}/json/redactions.scm | 0 .../src}/language_plugin.rs | 0 .../src/languages.rs => languages/src/lib.rs} | 2 +- .../src/languages => languages/src}/lua.rs | 0 .../src}/lua/brackets.scm | 0 .../src}/lua/config.toml | 0 .../src}/lua/embedding.scm | 0 .../src}/lua/highlights.scm | 0 .../src}/lua/indents.scm | 0 .../src}/lua/outline.scm | 0 .../src}/markdown/config.toml | 0 .../src}/markdown/highlights.scm | 0 .../src}/markdown/injections.scm | 0 .../src}/markdown/outline.scm | 0 .../src}/nix/config.toml | 0 .../src}/nix/highlights.scm | 0 .../src/languages => languages/src}/nu.rs | 0 .../src}/nu/brackets.scm | 0 .../src}/nu/config.toml | 0 .../src}/nu/highlights.scm | 0 .../src}/nu/indents.scm | 0 .../src}/ocaml-interface/brackets.scm | 0 .../src}/ocaml-interface/config.toml | 0 .../src}/ocaml-interface/highlights.scm | 0 .../src}/ocaml-interface/indents.scm | 0 .../src}/ocaml-interface/outline.scm | 0 .../src/languages => languages/src}/ocaml.rs | 0 .../src}/ocaml/brackets.scm | 0 .../src}/ocaml/config.toml | 0 .../src}/ocaml/highlights.scm | 0 .../src}/ocaml/indents.scm | 0 .../src}/ocaml/outline.scm | 0 .../src/languages => languages/src}/php.rs | 0 .../src}/php/config.toml | 0 .../src}/php/embedding.scm | 0 .../src}/php/highlights.scm | 0 .../src}/php/injections.scm | 0 .../src}/php/outline.scm | 0 .../languages => languages/src}/php/tags.scm | 0 .../src/languages => languages/src}/prisma.rs | 0 .../src}/prisma/config.toml | 0 .../src}/prisma/highlights.scm | 0 .../src}/proto/config.toml | 0 .../src}/proto/highlights.scm | 0 .../src}/proto/outline.scm | 0 .../languages => languages/src}/purescript.rs | 0 .../src}/purescript/brackets.scm | 0 .../src}/purescript/config.toml | 0 .../src}/purescript/highlights.scm | 0 .../src}/purescript/indents.scm | 0 .../src/languages => languages/src}/python.rs | 3 +- .../src}/python/brackets.scm | 0 .../src}/python/config.toml | 0 .../src}/python/embedding.scm | 0 .../src}/python/highlights.scm | 0 .../src}/python/indents.scm | 0 .../src}/python/outline.scm | 0 .../src}/python/overrides.scm | 0 .../src}/racket/brackets.scm | 0 .../src}/racket/config.toml | 0 .../src}/racket/highlights.scm | 0 .../src}/racket/indents.scm | 0 .../src}/racket/outline.scm | 0 .../src/languages => languages/src}/ruby.rs | 0 .../src}/ruby/brackets.scm | 0 .../src}/ruby/config.toml | 0 .../src}/ruby/embedding.scm | 0 .../src}/ruby/highlights.scm | 0 .../src}/ruby/indents.scm | 0 .../src}/ruby/outline.scm | 0 .../src}/ruby/overrides.scm | 0 .../src/languages => languages/src}/rust.rs | 4 +- .../src}/rust/brackets.scm | 0 .../src}/rust/config.toml | 0 .../src}/rust/embedding.scm | 0 .../src}/rust/highlights.scm | 0 .../src}/rust/indents.scm | 0 .../src}/rust/injections.scm | 0 .../src}/rust/outline.scm | 0 .../src}/rust/overrides.scm | 0 .../src}/scheme/brackets.scm | 0 .../src}/scheme/config.toml | 0 .../src}/scheme/highlights.scm | 0 .../src}/scheme/indents.scm | 0 .../src}/scheme/outline.scm | 0 .../src}/scheme/overrides.scm | 0 .../src/languages => languages/src}/svelte.rs | 0 .../src}/svelte/config.toml | 0 .../src}/svelte/folds.scm | 0 .../src}/svelte/highlights.scm | 0 .../src}/svelte/indents.scm | 0 .../src}/svelte/injections.scm | 0 .../src}/svelte/overrides.scm | 0 .../languages => languages/src}/tailwind.rs | 0 .../src}/terraform-vars/config.toml | 0 .../src}/terraform-vars/highlights.scm | 0 .../src}/terraform-vars/indents.scm | 0 .../src}/terraform-vars/injections.scm | 0 .../src}/terraform/config.toml | 0 .../src}/terraform/highlights.scm | 0 .../src}/terraform/indents.scm | 0 .../src}/terraform/injections.scm | 0 .../src/languages => languages/src}/toml.rs | 0 .../src}/toml/brackets.scm | 0 .../src}/toml/config.toml | 0 .../src}/toml/highlights.scm | 0 .../src}/toml/indents.scm | 0 .../src}/toml/outline.scm | 0 .../src}/toml/overrides.scm | 0 .../src}/toml/redactions.scm | 0 .../src}/tsx/brackets.scm | 0 .../src}/tsx/config.toml | 0 .../src}/tsx/embedding.scm | 0 .../src}/tsx/highlights-jsx.scm | 0 .../src}/tsx/highlights.scm | 0 .../src}/tsx/indents.scm | 0 .../src}/tsx/outline.scm | 0 .../src}/tsx/overrides.scm | 0 .../languages => languages/src}/typescript.rs | 2 +- .../src}/typescript/brackets.scm | 0 .../src}/typescript/config.toml | 0 .../src}/typescript/embedding.scm | 0 .../src}/typescript/highlights.scm | 0 .../src}/typescript/indents.scm | 0 .../src}/typescript/outline.scm | 0 .../src}/typescript/overrides.scm | 0 .../src/languages => languages/src}/uiua.rs | 0 .../src}/uiua/config.toml | 0 .../src}/uiua/highlights.scm | 0 .../src}/uiua/indents.scm | 0 .../src/languages => languages/src}/vue.rs | 0 .../src}/vue/brackets.scm | 0 .../src}/vue/config.toml | 0 .../src}/vue/highlights.scm | 0 .../src}/vue/injections.scm | 0 .../src/languages => languages/src}/yaml.rs | 0 .../src}/yaml/brackets.scm | 0 .../src}/yaml/config.toml | 0 .../src}/yaml/highlights.scm | 0 .../src}/yaml/outline.scm | 0 .../src}/yaml/redactions.scm | 0 .../src/languages => languages/src}/zig.rs | 0 .../src}/zig/brackets.scm | 0 .../src}/zig/config.toml | 0 .../languages => languages/src}/zig/folds.scm | 0 .../src}/zig/highlights.scm | 0 .../src}/zig/indents.scm | 0 .../src}/zig/injections.scm | 0 crates/recent_projects/Cargo.toml | 4 - crates/tasks_ui/Cargo.toml | 1 - crates/theme_selector/Cargo.toml | 1 - crates/zed/Cargo.toml | 49 +---- crates/zed/src/main.rs | 3 +- crates/zed/src/zed.rs | 1 - typos.toml | 2 +- 309 files changed, 221 insertions(+), 154 deletions(-) create mode 100644 crates/languages/Cargo.toml create mode 120000 crates/languages/LICENSE-GPL rename crates/{zed/src/languages => languages/src}/astro.rs (100%) rename crates/{zed/src/languages => languages/src}/astro/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/astro/config.toml (100%) rename crates/{zed/src/languages => languages/src}/astro/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/astro/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/bash/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/bash/config.toml (100%) rename crates/{zed/src/languages => languages/src}/bash/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/bash/redactions.scm (100%) rename crates/{zed/src/languages => languages/src}/c.rs (99%) rename crates/{zed/src/languages => languages/src}/c/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/c/config.toml (100%) rename crates/{zed/src/languages => languages/src}/c/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/c/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/c/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/c/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/c/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/c/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/clojure.rs (100%) rename crates/{zed/src/languages => languages/src}/clojure/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/clojure/config.toml (100%) rename crates/{zed/src/languages => languages/src}/clojure/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/clojure/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/clojure/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/cpp/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/cpp/config.toml (100%) rename crates/{zed/src/languages => languages/src}/cpp/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/cpp/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/cpp/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/cpp/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/cpp/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/cpp/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/csharp.rs (100%) rename crates/{zed/src/languages => languages/src}/csharp/config.toml (100%) rename crates/{zed/src/languages => languages/src}/csharp/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/csharp/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/csharp/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/css.rs (100%) rename crates/{zed/src/languages => languages/src}/css/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/css/config.toml (100%) rename crates/{zed/src/languages => languages/src}/css/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/css/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/css/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/dart.rs (100%) rename crates/{zed/src/languages => languages/src}/dart/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/dart/config.toml (100%) rename crates/{zed/src/languages => languages/src}/dart/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/dart/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/dart/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/deno.rs (100%) rename crates/{zed/src/languages => languages/src}/dockerfile.rs (100%) rename crates/{zed/src/languages => languages/src}/dockerfile/config.toml (100%) rename crates/{zed/src/languages => languages/src}/dockerfile/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/dockerfile/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/elixir.rs (100%) rename crates/{zed/src/languages => languages/src}/elixir/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/elixir/config.toml (100%) rename crates/{zed/src/languages => languages/src}/elixir/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/elixir/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/elixir/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/elixir/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/elixir/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/elixir/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/elm.rs (100%) rename crates/{zed/src/languages => languages/src}/elm/config.toml (100%) rename crates/{zed/src/languages => languages/src}/elm/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/elm/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/elm/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/erb/config.toml (100%) rename crates/{zed/src/languages => languages/src}/erb/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/erb/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/erlang.rs (100%) rename crates/{zed/src/languages => languages/src}/erlang/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/erlang/config.toml (100%) rename crates/{zed/src/languages => languages/src}/erlang/folds.scm (100%) rename crates/{zed/src/languages => languages/src}/erlang/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/erlang/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/erlang/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/gitcommit/config.toml (100%) rename crates/{zed/src/languages => languages/src}/gitcommit/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/gitcommit/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/gleam.rs (100%) rename crates/{zed/src/languages => languages/src}/gleam/config.toml (100%) rename crates/{zed/src/languages => languages/src}/gleam/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/gleam/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/gleam/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/glsl/config.toml (100%) rename crates/{zed/src/languages => languages/src}/glsl/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/go.rs (99%) rename crates/{zed/src/languages => languages/src}/go/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/go/config.toml (100%) rename crates/{zed/src/languages => languages/src}/go/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/go/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/go/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/go/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/go/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/gomod/config.toml (100%) rename crates/{zed/src/languages => languages/src}/gomod/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/gomod/structure.scm (100%) rename crates/{zed/src/languages => languages/src}/gowork/config.toml (100%) rename crates/{zed/src/languages => languages/src}/gowork/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/haskell.rs (100%) rename crates/{zed/src/languages => languages/src}/haskell/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/haskell/config.toml (100%) rename crates/{zed/src/languages => languages/src}/haskell/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/haskell/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/haskell/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/hcl/config.toml (100%) rename crates/{zed/src/languages => languages/src}/hcl/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/hcl/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/hcl/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/heex/config.toml (100%) rename crates/{zed/src/languages => languages/src}/heex/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/heex/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/heex/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/html.rs (100%) rename crates/{zed/src/languages => languages/src}/html/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/html/config.toml (100%) rename crates/{zed/src/languages => languages/src}/html/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/html/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/html/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/html/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/html/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/javascript/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/javascript/config.toml (100%) rename crates/{zed/src/languages => languages/src}/javascript/contexts.scm (100%) rename crates/{zed/src/languages => languages/src}/javascript/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/javascript/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/javascript/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/javascript/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/javascript/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/json.rs (100%) rename crates/{zed/src/languages => languages/src}/json/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/json/config.toml (100%) rename crates/{zed/src/languages => languages/src}/json/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/json/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/json/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/json/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/json/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/json/redactions.scm (100%) rename crates/{zed/src/languages => languages/src}/language_plugin.rs (100%) rename crates/{zed/src/languages.rs => languages/src/lib.rs} (99%) rename crates/{zed/src/languages => languages/src}/lua.rs (100%) rename crates/{zed/src/languages => languages/src}/lua/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/lua/config.toml (100%) rename crates/{zed/src/languages => languages/src}/lua/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/lua/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/lua/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/lua/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/markdown/config.toml (100%) rename crates/{zed/src/languages => languages/src}/markdown/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/markdown/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/markdown/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/nix/config.toml (100%) rename crates/{zed/src/languages => languages/src}/nix/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/nu.rs (100%) rename crates/{zed/src/languages => languages/src}/nu/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/nu/config.toml (100%) rename crates/{zed/src/languages => languages/src}/nu/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/nu/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/ocaml-interface/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/ocaml-interface/config.toml (100%) rename crates/{zed/src/languages => languages/src}/ocaml-interface/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/ocaml-interface/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/ocaml-interface/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/ocaml.rs (100%) rename crates/{zed/src/languages => languages/src}/ocaml/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/ocaml/config.toml (100%) rename crates/{zed/src/languages => languages/src}/ocaml/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/ocaml/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/ocaml/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/php.rs (100%) rename crates/{zed/src/languages => languages/src}/php/config.toml (100%) rename crates/{zed/src/languages => languages/src}/php/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/php/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/php/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/php/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/php/tags.scm (100%) rename crates/{zed/src/languages => languages/src}/prisma.rs (100%) rename crates/{zed/src/languages => languages/src}/prisma/config.toml (100%) rename crates/{zed/src/languages => languages/src}/prisma/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/proto/config.toml (100%) rename crates/{zed/src/languages => languages/src}/proto/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/proto/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/purescript.rs (100%) rename crates/{zed/src/languages => languages/src}/purescript/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/purescript/config.toml (100%) rename crates/{zed/src/languages => languages/src}/purescript/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/purescript/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/python.rs (99%) rename crates/{zed/src/languages => languages/src}/python/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/python/config.toml (100%) rename crates/{zed/src/languages => languages/src}/python/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/python/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/python/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/python/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/python/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/racket/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/racket/config.toml (100%) rename crates/{zed/src/languages => languages/src}/racket/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/racket/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/racket/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/ruby.rs (100%) rename crates/{zed/src/languages => languages/src}/ruby/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/ruby/config.toml (100%) rename crates/{zed/src/languages => languages/src}/ruby/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/ruby/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/ruby/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/ruby/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/ruby/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/rust.rs (99%) rename crates/{zed/src/languages => languages/src}/rust/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/rust/config.toml (100%) rename crates/{zed/src/languages => languages/src}/rust/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/rust/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/rust/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/rust/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/rust/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/rust/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/scheme/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/scheme/config.toml (100%) rename crates/{zed/src/languages => languages/src}/scheme/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/scheme/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/scheme/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/scheme/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/svelte.rs (100%) rename crates/{zed/src/languages => languages/src}/svelte/config.toml (100%) rename crates/{zed/src/languages => languages/src}/svelte/folds.scm (100%) rename crates/{zed/src/languages => languages/src}/svelte/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/svelte/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/svelte/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/svelte/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/tailwind.rs (100%) rename crates/{zed/src/languages => languages/src}/terraform-vars/config.toml (100%) rename crates/{zed/src/languages => languages/src}/terraform-vars/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/terraform-vars/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/terraform-vars/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/terraform/config.toml (100%) rename crates/{zed/src/languages => languages/src}/terraform/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/terraform/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/terraform/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/toml.rs (100%) rename crates/{zed/src/languages => languages/src}/toml/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/toml/config.toml (100%) rename crates/{zed/src/languages => languages/src}/toml/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/toml/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/toml/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/toml/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/toml/redactions.scm (100%) rename crates/{zed/src/languages => languages/src}/tsx/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/tsx/config.toml (100%) rename crates/{zed/src/languages => languages/src}/tsx/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/tsx/highlights-jsx.scm (100%) rename crates/{zed/src/languages => languages/src}/tsx/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/tsx/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/tsx/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/tsx/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/typescript.rs (99%) rename crates/{zed/src/languages => languages/src}/typescript/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/typescript/config.toml (100%) rename crates/{zed/src/languages => languages/src}/typescript/embedding.scm (100%) rename crates/{zed/src/languages => languages/src}/typescript/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/typescript/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/typescript/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/typescript/overrides.scm (100%) rename crates/{zed/src/languages => languages/src}/uiua.rs (100%) rename crates/{zed/src/languages => languages/src}/uiua/config.toml (100%) rename crates/{zed/src/languages => languages/src}/uiua/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/uiua/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/vue.rs (100%) rename crates/{zed/src/languages => languages/src}/vue/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/vue/config.toml (100%) rename crates/{zed/src/languages => languages/src}/vue/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/vue/injections.scm (100%) rename crates/{zed/src/languages => languages/src}/yaml.rs (100%) rename crates/{zed/src/languages => languages/src}/yaml/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/yaml/config.toml (100%) rename crates/{zed/src/languages => languages/src}/yaml/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/yaml/outline.scm (100%) rename crates/{zed/src/languages => languages/src}/yaml/redactions.scm (100%) rename crates/{zed/src/languages => languages/src}/zig.rs (100%) rename crates/{zed/src/languages => languages/src}/zig/brackets.scm (100%) rename crates/{zed/src/languages => languages/src}/zig/config.toml (100%) rename crates/{zed/src/languages => languages/src}/zig/folds.scm (100%) rename crates/{zed/src/languages => languages/src}/zig/highlights.scm (100%) rename crates/{zed/src/languages => languages/src}/zig/indents.scm (100%) rename crates/{zed/src/languages => languages/src}/zig/injections.scm (100%) diff --git a/Cargo.lock b/Cargo.lock index 4fdd5d6bec..ea81395ab8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -415,9 +415,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" +checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" dependencies = [ "flate2", "futures-core", @@ -692,9 +692,9 @@ checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", @@ -3313,7 +3313,6 @@ dependencies = [ "fuzzy", "gpui", "log", - "picker", "project", "serde", "serde_json", @@ -4799,7 +4798,7 @@ dependencies = [ "schemars", "serde", "settings", - "shellexpand", + "shellexpand 2.1.2", "util", "workspace", ] @@ -4994,6 +4993,89 @@ dependencies = [ "workspace", ] +[[package]] +name = "languages" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-compression", + "async-tar", + "async-trait", + "collections", + "feature_flags", + "futures 0.3.28", + "gpui", + "language", + "lazy_static", + "log", + "lsp", + "node_runtime", + "parking_lot 0.11.2", + "project", + "regex", + "rope", + "rust-embed", + "schemars", + "serde", + "serde_derive", + "serde_json", + "settings", + "shellexpand 3.1.0", + "smol", + "task", + "text", + "theme", + "toml 0.8.10", + "tree-sitter", + "tree-sitter-astro", + "tree-sitter-bash", + "tree-sitter-c", + "tree-sitter-c-sharp", + "tree-sitter-clojure", + "tree-sitter-cpp", + "tree-sitter-css", + "tree-sitter-dart", + "tree-sitter-dockerfile", + "tree-sitter-elixir", + "tree-sitter-elm", + "tree-sitter-embedded-template", + "tree-sitter-erlang", + "tree-sitter-gitcommit", + "tree-sitter-gleam", + "tree-sitter-glsl", + "tree-sitter-go", + "tree-sitter-gomod", + "tree-sitter-gowork", + "tree-sitter-haskell", + "tree-sitter-hcl", + "tree-sitter-heex", + "tree-sitter-html", + "tree-sitter-json 0.20.0", + "tree-sitter-lua", + "tree-sitter-markdown", + "tree-sitter-nix", + "tree-sitter-nu", + "tree-sitter-ocaml", + "tree-sitter-php", + "tree-sitter-prisma-io", + "tree-sitter-proto", + "tree-sitter-purescript", + "tree-sitter-python", + "tree-sitter-racket", + "tree-sitter-ruby", + "tree-sitter-rust", + "tree-sitter-scheme", + "tree-sitter-svelte", + "tree-sitter-toml", + "tree-sitter-typescript", + "tree-sitter-uiua", + "tree-sitter-vue", + "tree-sitter-yaml", + "tree-sitter-zig", + "unindent", + "util", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -7339,7 +7421,6 @@ dependencies = [ name = "recent_projects" version = "0.1.0" dependencies = [ - "editor", "futures 0.3.28", "fuzzy", "gpui", @@ -7801,9 +7882,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "8.0.0" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e7d90385b59f0a6bf3d3b757f3ca4ece2048265d70db20a2016043d4509a40" +checksum = "a82c0bbc10308ed323529fd3c1dce8badda635aa319a5ff0e6466f33b8101e3f" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -7812,9 +7893,9 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "8.0.0" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3d8c6fd84090ae348e63a84336b112b5c3918b3bf0493a581f7bd8ee623c29" +checksum = "6227c01b1783cdfee1bcf844eb44594cd16ec71c35305bf1c9fb5aade2735e16" dependencies = [ "proc-macro2", "quote", @@ -7825,9 +7906,9 @@ dependencies = [ [[package]] name = "rust-embed-utils" -version = "8.0.0" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "873feff8cb7bf86fdf0a71bb21c95159f4e4a37dd7a4bd1855a940909b583ada" +checksum = "8cb0a25bfbb2d4b4402179c2cf030387d9990857ce08a32592c6238db9fa8665" dependencies = [ "globset", "sha2 0.10.7", @@ -8546,6 +8627,15 @@ dependencies = [ "dirs 4.0.0", ] +[[package]] +name = "shellexpand" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" +dependencies = [ + "dirs 4.0.0", +] + [[package]] name = "shlex" version = "1.3.0" @@ -9381,7 +9471,6 @@ version = "0.1.0" dependencies = [ "anyhow", "db", - "editor", "fs", "futures 0.3.28", "fuzzy", @@ -9456,7 +9545,7 @@ dependencies = [ "serde_derive", "serde_json", "settings", - "shellexpand", + "shellexpand 2.1.2", "smallvec", "smol", "task", @@ -9491,7 +9580,7 @@ dependencies = [ "serde_derive", "serde_json", "settings", - "shellexpand", + "shellexpand 2.1.2", "smallvec", "smol", "task", @@ -12006,6 +12095,7 @@ dependencies = [ "language", "language_selector", "language_tools", + "languages", "lazy_static", "libc", "log", @@ -12039,7 +12129,7 @@ dependencies = [ "serde_derive", "serde_json", "settings", - "shellexpand", + "shellexpand 2.1.2", "simplelog", "smallvec", "smol", @@ -12054,52 +12144,7 @@ dependencies = [ "thiserror", "tiny_http", "toml 0.8.10", - "tree-sitter", - "tree-sitter-astro", - "tree-sitter-bash", - "tree-sitter-c", - "tree-sitter-c-sharp", - "tree-sitter-clojure", - "tree-sitter-cpp", - "tree-sitter-css", - "tree-sitter-dart", - "tree-sitter-dockerfile", - "tree-sitter-elixir", - "tree-sitter-elm", - "tree-sitter-embedded-template", - "tree-sitter-erlang", - "tree-sitter-gitcommit", - "tree-sitter-gleam", - "tree-sitter-glsl", - "tree-sitter-go", - "tree-sitter-gomod", - "tree-sitter-gowork", - "tree-sitter-haskell", - "tree-sitter-hcl", - "tree-sitter-heex", - "tree-sitter-html", - "tree-sitter-json 0.20.0", - "tree-sitter-lua", - "tree-sitter-markdown", - "tree-sitter-nix", - "tree-sitter-nu", - "tree-sitter-ocaml", - "tree-sitter-php", - "tree-sitter-prisma-io", - "tree-sitter-proto", - "tree-sitter-purescript", - "tree-sitter-python", - "tree-sitter-racket", - "tree-sitter-ruby", "tree-sitter-rust", - "tree-sitter-scheme", - "tree-sitter-svelte", - "tree-sitter-toml", - "tree-sitter-typescript", - "tree-sitter-uiua", - "tree-sitter-vue", - "tree-sitter-yaml", - "tree-sitter-zig", "unindent", "url", "urlencoding", diff --git a/Cargo.toml b/Cargo.toml index daed781727..2df6930078 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,6 +38,7 @@ members = [ "crates/language", "crates/language_selector", "crates/language_tools", + "crates/languages", "crates/live_kit_client", "crates/live_kit_server", "crates/lsp", diff --git a/crates/command_palette/Cargo.toml b/crates/command_palette/Cargo.toml index f95525542e..9382db1aa5 100644 --- a/crates/command_palette/Cargo.toml +++ b/crates/command_palette/Cargo.toml @@ -15,7 +15,6 @@ client.workspace = true collections.workspace = true # HACK: We're only depending on `copilot` here for `CommandPaletteFilter`. See the attached comment on that type. copilot.workspace = true -editor.workspace = true fuzzy.workspace = true gpui.workspace = true picker.workspace = true diff --git a/crates/diagnostics/src/diagnostics.rs b/crates/diagnostics/src/diagnostics.rs index 98004360ee..30003a0297 100644 --- a/crates/diagnostics/src/diagnostics.rs +++ b/crates/diagnostics/src/diagnostics.rs @@ -1584,7 +1584,6 @@ mod tests { } fn editor_blocks(editor: &View, cx: &mut WindowContext) -> Vec<(u32, SharedString)> { - let editor_view = editor.clone(); editor.update(cx, |editor, cx| { let snapshot = editor.snapshot(cx); snapshot @@ -1593,7 +1592,6 @@ mod tests { .filter_map(|(ix, (row, block))| { let name: SharedString = match block { TransformBlock::Custom(block) => cx.with_element_context({ - let editor_view = editor_view.clone(); |cx| -> Option { block .render(&mut BlockContext { @@ -1604,7 +1602,6 @@ mod tests { em_width: px(0.), max_width: px(0.), block_id: ix, - view: editor_view, editor_style: &editor::EditorStyle::default(), }) .inner_id()? diff --git a/crates/editor/src/display_map.rs b/crates/editor/src/display_map.rs index 2f4c4ddc44..344abeda65 100644 --- a/crates/editor/src/display_map.rs +++ b/crates/editor/src/display_map.rs @@ -24,10 +24,7 @@ mod tab_map; mod wrap_map; use crate::EditorStyle; -use crate::{ - hover_links::InlayHighlight, movement::TextLayoutDetails, Anchor, AnchorRangeExt, InlayId, - MultiBuffer, MultiBufferSnapshot, ToOffset, ToPoint, -}; +use crate::{hover_links::InlayHighlight, movement::TextLayoutDetails, InlayId}; pub use block_map::{BlockMap, BlockPoint}; use collections::{BTreeMap, HashMap, HashSet}; use fold_map::FoldMap; @@ -37,6 +34,7 @@ use language::{ language_settings::language_settings, OffsetUtf16, Point, Subscription as BufferSubscription, }; use lsp::DiagnosticSeverity; +use multi_buffer::{Anchor, AnchorRangeExt, MultiBuffer, MultiBufferSnapshot, ToOffset, ToPoint}; use std::{any::TypeId, borrow::Cow, fmt::Debug, num::NonZeroU32, ops::Range, sync::Arc}; use sum_tree::{Bias, TreeMap}; use tab_map::TabMap; diff --git a/crates/editor/src/display_map/block_map.rs b/crates/editor/src/display_map/block_map.rs index 3c2dc598a2..6effe23a8f 100644 --- a/crates/editor/src/display_map/block_map.rs +++ b/crates/editor/src/display_map/block_map.rs @@ -2,10 +2,11 @@ use super::{ wrap_map::{self, WrapEdit, WrapPoint, WrapSnapshot}, Highlights, }; -use crate::{Anchor, Editor, EditorStyle, ExcerptId, ExcerptRange, GutterDimensions, ToPoint as _}; +use crate::{EditorStyle, GutterDimensions}; use collections::{Bound, HashMap, HashSet}; -use gpui::{AnyElement, ElementContext, Pixels, View}; +use gpui::{AnyElement, ElementContext, Pixels}; use language::{BufferSnapshot, Chunk, Patch, Point}; +use multi_buffer::{Anchor, ExcerptId, ExcerptRange, ToPoint as _}; use parking_lot::Mutex; use std::{ cell::RefCell, @@ -85,7 +86,6 @@ pub enum BlockStyle { pub struct BlockContext<'a, 'b> { pub context: &'b mut ElementContext<'a>, - pub view: View, pub anchor_x: Pixels, pub max_width: Pixels, pub gutter_dimensions: &'b GutterDimensions, diff --git a/crates/editor/src/display_map/fold_map.rs b/crates/editor/src/display_map/fold_map.rs index 07d40fcc12..4c38ff1416 100644 --- a/crates/editor/src/display_map/fold_map.rs +++ b/crates/editor/src/display_map/fold_map.rs @@ -2,9 +2,9 @@ use super::{ inlay_map::{InlayBufferRows, InlayChunks, InlayEdit, InlayOffset, InlayPoint, InlaySnapshot}, Highlights, }; -use crate::{Anchor, AnchorRangeExt, MultiBufferSnapshot, ToOffset}; use gpui::{ElementId, HighlightStyle, Hsla}; use language::{Chunk, Edit, Point, TextSummary}; +use multi_buffer::{Anchor, AnchorRangeExt, MultiBufferSnapshot, ToOffset}; use std::{ any::TypeId, cmp::{self, Ordering}, diff --git a/crates/editor/src/display_map/inlay_map.rs b/crates/editor/src/display_map/inlay_map.rs index c26684a07b..5dcae58f48 100644 --- a/crates/editor/src/display_map/inlay_map.rs +++ b/crates/editor/src/display_map/inlay_map.rs @@ -1,8 +1,8 @@ -use crate::{Anchor, InlayId, MultiBufferSnapshot, ToOffset}; +use crate::InlayId; use collections::{BTreeMap, BTreeSet}; use gpui::HighlightStyle; use language::{Chunk, Edit, Point, TextSummary}; -use multi_buffer::{MultiBufferChunks, MultiBufferRows}; +use multi_buffer::{Anchor, MultiBufferChunks, MultiBufferRows, MultiBufferSnapshot, ToOffset}; use std::{ any::TypeId, cmp, diff --git a/crates/editor/src/display_map/tab_map.rs b/crates/editor/src/display_map/tab_map.rs index 7efc6b193b..c761c9ba60 100644 --- a/crates/editor/src/display_map/tab_map.rs +++ b/crates/editor/src/display_map/tab_map.rs @@ -2,8 +2,8 @@ use super::{ fold_map::{self, FoldChunks, FoldEdit, FoldPoint, FoldSnapshot}, Highlights, }; -use crate::MultiBufferSnapshot; use language::{Chunk, Point}; +use multi_buffer::MultiBufferSnapshot; use std::{cmp, mem, num::NonZeroU32, ops::Range}; use sum_tree::Bias; diff --git a/crates/editor/src/display_map/wrap_map.rs b/crates/editor/src/display_map/wrap_map.rs index bdf5815f13..65d3bf49e2 100644 --- a/crates/editor/src/display_map/wrap_map.rs +++ b/crates/editor/src/display_map/wrap_map.rs @@ -3,10 +3,10 @@ use super::{ tab_map::{self, TabEdit, TabPoint, TabSnapshot}, Highlights, }; -use crate::MultiBufferSnapshot; use gpui::{AppContext, Context, Font, LineWrapper, Model, ModelContext, Pixels, Task}; use language::{Chunk, Point}; use lazy_static::lazy_static; +use multi_buffer::MultiBufferSnapshot; use smol::future::yield_now; use std::{cmp, collections::VecDeque, mem, ops::Range, time::Duration}; use sum_tree::{Bias, Cursor, SumTree}; diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index c1b01c195a..090f4a14a7 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -122,7 +122,7 @@ use ui::{ }; use util::{maybe, post_inc, RangeExt, ResultExt, TryFutureExt}; use workspace::Toast; -use workspace::{searchable::SearchEvent, ItemNavHistory, Pane, SplitDirection, ViewId, Workspace}; +use workspace::{searchable::SearchEvent, ItemNavHistory, SplitDirection, ViewId, Workspace}; use crate::hover_links::find_url; @@ -356,7 +356,6 @@ type InlayBackgroundHighlight = (fn(&ThemeColors) -> Hsla, Vec); /// /// See the [module level documentation](self) for more information. pub struct Editor { - handle: WeakView, focus_handle: FocusHandle, /// The text buffer being edited buffer: Model, @@ -1488,7 +1487,6 @@ impl Editor { cx.on_blur(&focus_handle, Self::handle_blur).detach(); let mut this = Self { - handle: cx.view().downgrade(), focus_handle, buffer: buffer.clone(), display_map: display_map.clone(), @@ -1686,10 +1684,6 @@ impl Editor { self.workspace.as_ref()?.0.upgrade() } - pub fn pane(&self, cx: &AppContext) -> Option> { - self.workspace()?.read(cx).pane_for(&self.handle.upgrade()?) - } - pub fn title<'a>(&self, cx: &'a AppContext) -> Cow<'a, str> { self.buffer().read(cx).title(cx) } diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index c965d3abdb..cdcc8ed1cd 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -2225,7 +2225,6 @@ impl EditorElement { .width; let scroll_width = longest_line_width.max(max_visible_line_width) + overscroll.width; - let editor_view = cx.view().clone(); let (scroll_width, blocks) = cx.with_element_context(|cx| { cx.with_element_id(Some("editor_blocks"), |cx| { self.layout_blocks( @@ -2241,7 +2240,6 @@ impl EditorElement { &style, &line_layouts, editor, - editor_view, cx, ) }) @@ -2436,7 +2434,6 @@ impl EditorElement { style: &EditorStyle, line_layouts: &[LineWithInvisibles], editor: &mut Editor, - editor_view: View, cx: &mut ElementContext, ) -> (Pixels, Vec) { let mut block_id = 0; @@ -2477,7 +2474,6 @@ impl EditorElement { em_width, block_id, max_width: scroll_width.max(text_width), - view: editor_view.clone(), editor_style: &self.style, }) } diff --git a/crates/extensions_ui/Cargo.toml b/crates/extensions_ui/Cargo.toml index 04af02a4c9..cd1e89838a 100644 --- a/crates/extensions_ui/Cargo.toml +++ b/crates/extensions_ui/Cargo.toml @@ -24,7 +24,6 @@ futures.workspace = true fuzzy.workspace = true gpui.workspace = true log.workspace = true -picker.workspace = true project.workspace = true serde.workspace = true serde_json.workspace = true diff --git a/crates/languages/Cargo.toml b/crates/languages/Cargo.toml new file mode 100644 index 0000000000..522685dcbe --- /dev/null +++ b/crates/languages/Cargo.toml @@ -0,0 +1,89 @@ +[package] +name = "languages" +version = "0.1.0" +edition = "2021" +publish = false +license = "GPL-3.0-or-later" +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow.workspace = true +gpui.workspace = true +language.workspace = true +node_runtime.workspace = true +rust-embed = "8.2.0" +settings.workspace = true + +tree-sitter-astro.workspace = true +tree-sitter-bash.workspace = true +tree-sitter-c-sharp.workspace = true +tree-sitter-c.workspace = true +tree-sitter-clojure.workspace = true +tree-sitter-cpp.workspace = true +tree-sitter-css.workspace = true +tree-sitter-dockerfile.workspace = true +tree-sitter-dart.workspace = true +tree-sitter-elixir.workspace = true +tree-sitter-elm.workspace = true +tree-sitter-embedded-template.workspace = true +tree-sitter-erlang.workspace = true +tree-sitter-gitcommit.workspace = true +tree-sitter-gleam.workspace = true +tree-sitter-glsl.workspace = true +tree-sitter-go.workspace = true +tree-sitter-gomod.workspace = true +tree-sitter-gowork.workspace = true +tree-sitter-haskell.workspace = true +tree-sitter-hcl.workspace = true +tree-sitter-heex.workspace = true +tree-sitter-html.workspace = true +tree-sitter-json.workspace = true +tree-sitter-lua.workspace = true +tree-sitter-markdown.workspace = true +tree-sitter-nix.workspace = true +tree-sitter-nu.workspace = true +tree-sitter-ocaml.workspace = true +tree-sitter-php.workspace = true +tree-sitter-prisma-io.workspace = true +tree-sitter-proto.workspace = true +tree-sitter-purescript.workspace = true +tree-sitter-python.workspace = true +tree-sitter-racket.workspace = true +tree-sitter-ruby.workspace = true +tree-sitter-rust.workspace = true +tree-sitter-scheme.workspace = true +tree-sitter-svelte.workspace = true +tree-sitter-toml.workspace = true +tree-sitter-typescript.workspace = true +tree-sitter-uiua.workspace = true +tree-sitter-vue.workspace = true +tree-sitter-yaml.workspace = true +tree-sitter-zig.workspace = true +tree-sitter.workspace = true +util.workspace = true +lsp.workspace = true +async-trait = "0.1.77" +shellexpand = "3.1.0" +serde_json.workspace = true +serde_derive.workspace = true +futures.workspace = true +smol.workspace = true +toml.workspace = true +lazy_static.workspace = true +schemars.workspace = true +log.workspace = true +task.workspace = true +parking_lot.workspace = true +async-compression = "0.4.6" +collections.workspace = true +async-tar = "0.4.2" +regex.workspace = true +feature_flags.workspace = true +project.workspace = true +serde.workspace = true +rope.workspace = true + +[dev-dependencies] +text.workspace = true +theme.workspace = true +unindent.workspace = true diff --git a/crates/languages/LICENSE-GPL b/crates/languages/LICENSE-GPL new file mode 120000 index 0000000000..89e542f750 --- /dev/null +++ b/crates/languages/LICENSE-GPL @@ -0,0 +1 @@ +../../LICENSE-GPL \ No newline at end of file diff --git a/crates/zed/src/languages/astro.rs b/crates/languages/src/astro.rs similarity index 100% rename from crates/zed/src/languages/astro.rs rename to crates/languages/src/astro.rs diff --git a/crates/zed/src/languages/astro/brackets.scm b/crates/languages/src/astro/brackets.scm similarity index 100% rename from crates/zed/src/languages/astro/brackets.scm rename to crates/languages/src/astro/brackets.scm diff --git a/crates/zed/src/languages/astro/config.toml b/crates/languages/src/astro/config.toml similarity index 100% rename from crates/zed/src/languages/astro/config.toml rename to crates/languages/src/astro/config.toml diff --git a/crates/zed/src/languages/astro/highlights.scm b/crates/languages/src/astro/highlights.scm similarity index 100% rename from crates/zed/src/languages/astro/highlights.scm rename to crates/languages/src/astro/highlights.scm diff --git a/crates/zed/src/languages/astro/injections.scm b/crates/languages/src/astro/injections.scm similarity index 100% rename from crates/zed/src/languages/astro/injections.scm rename to crates/languages/src/astro/injections.scm diff --git a/crates/zed/src/languages/bash/brackets.scm b/crates/languages/src/bash/brackets.scm similarity index 100% rename from crates/zed/src/languages/bash/brackets.scm rename to crates/languages/src/bash/brackets.scm diff --git a/crates/zed/src/languages/bash/config.toml b/crates/languages/src/bash/config.toml similarity index 100% rename from crates/zed/src/languages/bash/config.toml rename to crates/languages/src/bash/config.toml diff --git a/crates/zed/src/languages/bash/highlights.scm b/crates/languages/src/bash/highlights.scm similarity index 100% rename from crates/zed/src/languages/bash/highlights.scm rename to crates/languages/src/bash/highlights.scm diff --git a/crates/zed/src/languages/bash/redactions.scm b/crates/languages/src/bash/redactions.scm similarity index 100% rename from crates/zed/src/languages/bash/redactions.scm rename to crates/languages/src/bash/redactions.scm diff --git a/crates/zed/src/languages/c.rs b/crates/languages/src/c.rs similarity index 99% rename from crates/zed/src/languages/c.rs rename to crates/languages/src/c.rs index 60d0b9b63b..a19361c6b4 100644 --- a/crates/zed/src/languages/c.rs +++ b/crates/languages/src/c.rs @@ -296,7 +296,7 @@ mod tests { }); }); }); - let language = crate::languages::language("c", tree_sitter_c::language(), None).await; + let language = crate::language("c", tree_sitter_c::language(), None).await; cx.new_model(|cx| { let mut buffer = Buffer::new(0, BufferId::new(cx.entity_id().as_u64()).unwrap(), "") diff --git a/crates/zed/src/languages/c/brackets.scm b/crates/languages/src/c/brackets.scm similarity index 100% rename from crates/zed/src/languages/c/brackets.scm rename to crates/languages/src/c/brackets.scm diff --git a/crates/zed/src/languages/c/config.toml b/crates/languages/src/c/config.toml similarity index 100% rename from crates/zed/src/languages/c/config.toml rename to crates/languages/src/c/config.toml diff --git a/crates/zed/src/languages/c/embedding.scm b/crates/languages/src/c/embedding.scm similarity index 100% rename from crates/zed/src/languages/c/embedding.scm rename to crates/languages/src/c/embedding.scm diff --git a/crates/zed/src/languages/c/highlights.scm b/crates/languages/src/c/highlights.scm similarity index 100% rename from crates/zed/src/languages/c/highlights.scm rename to crates/languages/src/c/highlights.scm diff --git a/crates/zed/src/languages/c/indents.scm b/crates/languages/src/c/indents.scm similarity index 100% rename from crates/zed/src/languages/c/indents.scm rename to crates/languages/src/c/indents.scm diff --git a/crates/zed/src/languages/c/injections.scm b/crates/languages/src/c/injections.scm similarity index 100% rename from crates/zed/src/languages/c/injections.scm rename to crates/languages/src/c/injections.scm diff --git a/crates/zed/src/languages/c/outline.scm b/crates/languages/src/c/outline.scm similarity index 100% rename from crates/zed/src/languages/c/outline.scm rename to crates/languages/src/c/outline.scm diff --git a/crates/zed/src/languages/c/overrides.scm b/crates/languages/src/c/overrides.scm similarity index 100% rename from crates/zed/src/languages/c/overrides.scm rename to crates/languages/src/c/overrides.scm diff --git a/crates/zed/src/languages/clojure.rs b/crates/languages/src/clojure.rs similarity index 100% rename from crates/zed/src/languages/clojure.rs rename to crates/languages/src/clojure.rs diff --git a/crates/zed/src/languages/clojure/brackets.scm b/crates/languages/src/clojure/brackets.scm similarity index 100% rename from crates/zed/src/languages/clojure/brackets.scm rename to crates/languages/src/clojure/brackets.scm diff --git a/crates/zed/src/languages/clojure/config.toml b/crates/languages/src/clojure/config.toml similarity index 100% rename from crates/zed/src/languages/clojure/config.toml rename to crates/languages/src/clojure/config.toml diff --git a/crates/zed/src/languages/clojure/highlights.scm b/crates/languages/src/clojure/highlights.scm similarity index 100% rename from crates/zed/src/languages/clojure/highlights.scm rename to crates/languages/src/clojure/highlights.scm diff --git a/crates/zed/src/languages/clojure/indents.scm b/crates/languages/src/clojure/indents.scm similarity index 100% rename from crates/zed/src/languages/clojure/indents.scm rename to crates/languages/src/clojure/indents.scm diff --git a/crates/zed/src/languages/clojure/outline.scm b/crates/languages/src/clojure/outline.scm similarity index 100% rename from crates/zed/src/languages/clojure/outline.scm rename to crates/languages/src/clojure/outline.scm diff --git a/crates/zed/src/languages/cpp/brackets.scm b/crates/languages/src/cpp/brackets.scm similarity index 100% rename from crates/zed/src/languages/cpp/brackets.scm rename to crates/languages/src/cpp/brackets.scm diff --git a/crates/zed/src/languages/cpp/config.toml b/crates/languages/src/cpp/config.toml similarity index 100% rename from crates/zed/src/languages/cpp/config.toml rename to crates/languages/src/cpp/config.toml diff --git a/crates/zed/src/languages/cpp/embedding.scm b/crates/languages/src/cpp/embedding.scm similarity index 100% rename from crates/zed/src/languages/cpp/embedding.scm rename to crates/languages/src/cpp/embedding.scm diff --git a/crates/zed/src/languages/cpp/highlights.scm b/crates/languages/src/cpp/highlights.scm similarity index 100% rename from crates/zed/src/languages/cpp/highlights.scm rename to crates/languages/src/cpp/highlights.scm diff --git a/crates/zed/src/languages/cpp/indents.scm b/crates/languages/src/cpp/indents.scm similarity index 100% rename from crates/zed/src/languages/cpp/indents.scm rename to crates/languages/src/cpp/indents.scm diff --git a/crates/zed/src/languages/cpp/injections.scm b/crates/languages/src/cpp/injections.scm similarity index 100% rename from crates/zed/src/languages/cpp/injections.scm rename to crates/languages/src/cpp/injections.scm diff --git a/crates/zed/src/languages/cpp/outline.scm b/crates/languages/src/cpp/outline.scm similarity index 100% rename from crates/zed/src/languages/cpp/outline.scm rename to crates/languages/src/cpp/outline.scm diff --git a/crates/zed/src/languages/cpp/overrides.scm b/crates/languages/src/cpp/overrides.scm similarity index 100% rename from crates/zed/src/languages/cpp/overrides.scm rename to crates/languages/src/cpp/overrides.scm diff --git a/crates/zed/src/languages/csharp.rs b/crates/languages/src/csharp.rs similarity index 100% rename from crates/zed/src/languages/csharp.rs rename to crates/languages/src/csharp.rs diff --git a/crates/zed/src/languages/csharp/config.toml b/crates/languages/src/csharp/config.toml similarity index 100% rename from crates/zed/src/languages/csharp/config.toml rename to crates/languages/src/csharp/config.toml diff --git a/crates/zed/src/languages/csharp/highlights.scm b/crates/languages/src/csharp/highlights.scm similarity index 100% rename from crates/zed/src/languages/csharp/highlights.scm rename to crates/languages/src/csharp/highlights.scm diff --git a/crates/zed/src/languages/csharp/injections.scm b/crates/languages/src/csharp/injections.scm similarity index 100% rename from crates/zed/src/languages/csharp/injections.scm rename to crates/languages/src/csharp/injections.scm diff --git a/crates/zed/src/languages/csharp/outline.scm b/crates/languages/src/csharp/outline.scm similarity index 100% rename from crates/zed/src/languages/csharp/outline.scm rename to crates/languages/src/csharp/outline.scm diff --git a/crates/zed/src/languages/css.rs b/crates/languages/src/css.rs similarity index 100% rename from crates/zed/src/languages/css.rs rename to crates/languages/src/css.rs diff --git a/crates/zed/src/languages/css/brackets.scm b/crates/languages/src/css/brackets.scm similarity index 100% rename from crates/zed/src/languages/css/brackets.scm rename to crates/languages/src/css/brackets.scm diff --git a/crates/zed/src/languages/css/config.toml b/crates/languages/src/css/config.toml similarity index 100% rename from crates/zed/src/languages/css/config.toml rename to crates/languages/src/css/config.toml diff --git a/crates/zed/src/languages/css/highlights.scm b/crates/languages/src/css/highlights.scm similarity index 100% rename from crates/zed/src/languages/css/highlights.scm rename to crates/languages/src/css/highlights.scm diff --git a/crates/zed/src/languages/css/indents.scm b/crates/languages/src/css/indents.scm similarity index 100% rename from crates/zed/src/languages/css/indents.scm rename to crates/languages/src/css/indents.scm diff --git a/crates/zed/src/languages/css/overrides.scm b/crates/languages/src/css/overrides.scm similarity index 100% rename from crates/zed/src/languages/css/overrides.scm rename to crates/languages/src/css/overrides.scm diff --git a/crates/zed/src/languages/dart.rs b/crates/languages/src/dart.rs similarity index 100% rename from crates/zed/src/languages/dart.rs rename to crates/languages/src/dart.rs diff --git a/crates/zed/src/languages/dart/brackets.scm b/crates/languages/src/dart/brackets.scm similarity index 100% rename from crates/zed/src/languages/dart/brackets.scm rename to crates/languages/src/dart/brackets.scm diff --git a/crates/zed/src/languages/dart/config.toml b/crates/languages/src/dart/config.toml similarity index 100% rename from crates/zed/src/languages/dart/config.toml rename to crates/languages/src/dart/config.toml diff --git a/crates/zed/src/languages/dart/highlights.scm b/crates/languages/src/dart/highlights.scm similarity index 100% rename from crates/zed/src/languages/dart/highlights.scm rename to crates/languages/src/dart/highlights.scm diff --git a/crates/zed/src/languages/dart/indents.scm b/crates/languages/src/dart/indents.scm similarity index 100% rename from crates/zed/src/languages/dart/indents.scm rename to crates/languages/src/dart/indents.scm diff --git a/crates/zed/src/languages/dart/outline.scm b/crates/languages/src/dart/outline.scm similarity index 100% rename from crates/zed/src/languages/dart/outline.scm rename to crates/languages/src/dart/outline.scm diff --git a/crates/zed/src/languages/deno.rs b/crates/languages/src/deno.rs similarity index 100% rename from crates/zed/src/languages/deno.rs rename to crates/languages/src/deno.rs diff --git a/crates/zed/src/languages/dockerfile.rs b/crates/languages/src/dockerfile.rs similarity index 100% rename from crates/zed/src/languages/dockerfile.rs rename to crates/languages/src/dockerfile.rs diff --git a/crates/zed/src/languages/dockerfile/config.toml b/crates/languages/src/dockerfile/config.toml similarity index 100% rename from crates/zed/src/languages/dockerfile/config.toml rename to crates/languages/src/dockerfile/config.toml diff --git a/crates/zed/src/languages/dockerfile/highlights.scm b/crates/languages/src/dockerfile/highlights.scm similarity index 100% rename from crates/zed/src/languages/dockerfile/highlights.scm rename to crates/languages/src/dockerfile/highlights.scm diff --git a/crates/zed/src/languages/dockerfile/injections.scm b/crates/languages/src/dockerfile/injections.scm similarity index 100% rename from crates/zed/src/languages/dockerfile/injections.scm rename to crates/languages/src/dockerfile/injections.scm diff --git a/crates/zed/src/languages/elixir.rs b/crates/languages/src/elixir.rs similarity index 100% rename from crates/zed/src/languages/elixir.rs rename to crates/languages/src/elixir.rs diff --git a/crates/zed/src/languages/elixir/brackets.scm b/crates/languages/src/elixir/brackets.scm similarity index 100% rename from crates/zed/src/languages/elixir/brackets.scm rename to crates/languages/src/elixir/brackets.scm diff --git a/crates/zed/src/languages/elixir/config.toml b/crates/languages/src/elixir/config.toml similarity index 100% rename from crates/zed/src/languages/elixir/config.toml rename to crates/languages/src/elixir/config.toml diff --git a/crates/zed/src/languages/elixir/embedding.scm b/crates/languages/src/elixir/embedding.scm similarity index 100% rename from crates/zed/src/languages/elixir/embedding.scm rename to crates/languages/src/elixir/embedding.scm diff --git a/crates/zed/src/languages/elixir/highlights.scm b/crates/languages/src/elixir/highlights.scm similarity index 100% rename from crates/zed/src/languages/elixir/highlights.scm rename to crates/languages/src/elixir/highlights.scm diff --git a/crates/zed/src/languages/elixir/indents.scm b/crates/languages/src/elixir/indents.scm similarity index 100% rename from crates/zed/src/languages/elixir/indents.scm rename to crates/languages/src/elixir/indents.scm diff --git a/crates/zed/src/languages/elixir/injections.scm b/crates/languages/src/elixir/injections.scm similarity index 100% rename from crates/zed/src/languages/elixir/injections.scm rename to crates/languages/src/elixir/injections.scm diff --git a/crates/zed/src/languages/elixir/outline.scm b/crates/languages/src/elixir/outline.scm similarity index 100% rename from crates/zed/src/languages/elixir/outline.scm rename to crates/languages/src/elixir/outline.scm diff --git a/crates/zed/src/languages/elixir/overrides.scm b/crates/languages/src/elixir/overrides.scm similarity index 100% rename from crates/zed/src/languages/elixir/overrides.scm rename to crates/languages/src/elixir/overrides.scm diff --git a/crates/zed/src/languages/elm.rs b/crates/languages/src/elm.rs similarity index 100% rename from crates/zed/src/languages/elm.rs rename to crates/languages/src/elm.rs diff --git a/crates/zed/src/languages/elm/config.toml b/crates/languages/src/elm/config.toml similarity index 100% rename from crates/zed/src/languages/elm/config.toml rename to crates/languages/src/elm/config.toml diff --git a/crates/zed/src/languages/elm/highlights.scm b/crates/languages/src/elm/highlights.scm similarity index 100% rename from crates/zed/src/languages/elm/highlights.scm rename to crates/languages/src/elm/highlights.scm diff --git a/crates/zed/src/languages/elm/injections.scm b/crates/languages/src/elm/injections.scm similarity index 100% rename from crates/zed/src/languages/elm/injections.scm rename to crates/languages/src/elm/injections.scm diff --git a/crates/zed/src/languages/elm/outline.scm b/crates/languages/src/elm/outline.scm similarity index 100% rename from crates/zed/src/languages/elm/outline.scm rename to crates/languages/src/elm/outline.scm diff --git a/crates/zed/src/languages/erb/config.toml b/crates/languages/src/erb/config.toml similarity index 100% rename from crates/zed/src/languages/erb/config.toml rename to crates/languages/src/erb/config.toml diff --git a/crates/zed/src/languages/erb/highlights.scm b/crates/languages/src/erb/highlights.scm similarity index 100% rename from crates/zed/src/languages/erb/highlights.scm rename to crates/languages/src/erb/highlights.scm diff --git a/crates/zed/src/languages/erb/injections.scm b/crates/languages/src/erb/injections.scm similarity index 100% rename from crates/zed/src/languages/erb/injections.scm rename to crates/languages/src/erb/injections.scm diff --git a/crates/zed/src/languages/erlang.rs b/crates/languages/src/erlang.rs similarity index 100% rename from crates/zed/src/languages/erlang.rs rename to crates/languages/src/erlang.rs diff --git a/crates/zed/src/languages/erlang/brackets.scm b/crates/languages/src/erlang/brackets.scm similarity index 100% rename from crates/zed/src/languages/erlang/brackets.scm rename to crates/languages/src/erlang/brackets.scm diff --git a/crates/zed/src/languages/erlang/config.toml b/crates/languages/src/erlang/config.toml similarity index 100% rename from crates/zed/src/languages/erlang/config.toml rename to crates/languages/src/erlang/config.toml diff --git a/crates/zed/src/languages/erlang/folds.scm b/crates/languages/src/erlang/folds.scm similarity index 100% rename from crates/zed/src/languages/erlang/folds.scm rename to crates/languages/src/erlang/folds.scm diff --git a/crates/zed/src/languages/erlang/highlights.scm b/crates/languages/src/erlang/highlights.scm similarity index 100% rename from crates/zed/src/languages/erlang/highlights.scm rename to crates/languages/src/erlang/highlights.scm diff --git a/crates/zed/src/languages/erlang/indents.scm b/crates/languages/src/erlang/indents.scm similarity index 100% rename from crates/zed/src/languages/erlang/indents.scm rename to crates/languages/src/erlang/indents.scm diff --git a/crates/zed/src/languages/erlang/outline.scm b/crates/languages/src/erlang/outline.scm similarity index 100% rename from crates/zed/src/languages/erlang/outline.scm rename to crates/languages/src/erlang/outline.scm diff --git a/crates/zed/src/languages/gitcommit/config.toml b/crates/languages/src/gitcommit/config.toml similarity index 100% rename from crates/zed/src/languages/gitcommit/config.toml rename to crates/languages/src/gitcommit/config.toml diff --git a/crates/zed/src/languages/gitcommit/highlights.scm b/crates/languages/src/gitcommit/highlights.scm similarity index 100% rename from crates/zed/src/languages/gitcommit/highlights.scm rename to crates/languages/src/gitcommit/highlights.scm diff --git a/crates/zed/src/languages/gitcommit/injections.scm b/crates/languages/src/gitcommit/injections.scm similarity index 100% rename from crates/zed/src/languages/gitcommit/injections.scm rename to crates/languages/src/gitcommit/injections.scm diff --git a/crates/zed/src/languages/gleam.rs b/crates/languages/src/gleam.rs similarity index 100% rename from crates/zed/src/languages/gleam.rs rename to crates/languages/src/gleam.rs diff --git a/crates/zed/src/languages/gleam/config.toml b/crates/languages/src/gleam/config.toml similarity index 100% rename from crates/zed/src/languages/gleam/config.toml rename to crates/languages/src/gleam/config.toml diff --git a/crates/zed/src/languages/gleam/highlights.scm b/crates/languages/src/gleam/highlights.scm similarity index 100% rename from crates/zed/src/languages/gleam/highlights.scm rename to crates/languages/src/gleam/highlights.scm diff --git a/crates/zed/src/languages/gleam/indents.scm b/crates/languages/src/gleam/indents.scm similarity index 100% rename from crates/zed/src/languages/gleam/indents.scm rename to crates/languages/src/gleam/indents.scm diff --git a/crates/zed/src/languages/gleam/outline.scm b/crates/languages/src/gleam/outline.scm similarity index 100% rename from crates/zed/src/languages/gleam/outline.scm rename to crates/languages/src/gleam/outline.scm diff --git a/crates/zed/src/languages/glsl/config.toml b/crates/languages/src/glsl/config.toml similarity index 100% rename from crates/zed/src/languages/glsl/config.toml rename to crates/languages/src/glsl/config.toml diff --git a/crates/zed/src/languages/glsl/highlights.scm b/crates/languages/src/glsl/highlights.scm similarity index 100% rename from crates/zed/src/languages/glsl/highlights.scm rename to crates/languages/src/glsl/highlights.scm diff --git a/crates/zed/src/languages/go.rs b/crates/languages/src/go.rs similarity index 99% rename from crates/zed/src/languages/go.rs rename to crates/languages/src/go.rs index 96f8baee5b..ba7aedb71b 100644 --- a/crates/zed/src/languages/go.rs +++ b/crates/languages/src/go.rs @@ -417,7 +417,7 @@ fn adjust_runs( #[cfg(test)] mod tests { use super::*; - use crate::languages::language; + use crate::language; use gpui::Hsla; use theme::SyntaxTheme; diff --git a/crates/zed/src/languages/go/brackets.scm b/crates/languages/src/go/brackets.scm similarity index 100% rename from crates/zed/src/languages/go/brackets.scm rename to crates/languages/src/go/brackets.scm diff --git a/crates/zed/src/languages/go/config.toml b/crates/languages/src/go/config.toml similarity index 100% rename from crates/zed/src/languages/go/config.toml rename to crates/languages/src/go/config.toml diff --git a/crates/zed/src/languages/go/embedding.scm b/crates/languages/src/go/embedding.scm similarity index 100% rename from crates/zed/src/languages/go/embedding.scm rename to crates/languages/src/go/embedding.scm diff --git a/crates/zed/src/languages/go/highlights.scm b/crates/languages/src/go/highlights.scm similarity index 100% rename from crates/zed/src/languages/go/highlights.scm rename to crates/languages/src/go/highlights.scm diff --git a/crates/zed/src/languages/go/indents.scm b/crates/languages/src/go/indents.scm similarity index 100% rename from crates/zed/src/languages/go/indents.scm rename to crates/languages/src/go/indents.scm diff --git a/crates/zed/src/languages/go/outline.scm b/crates/languages/src/go/outline.scm similarity index 100% rename from crates/zed/src/languages/go/outline.scm rename to crates/languages/src/go/outline.scm diff --git a/crates/zed/src/languages/go/overrides.scm b/crates/languages/src/go/overrides.scm similarity index 100% rename from crates/zed/src/languages/go/overrides.scm rename to crates/languages/src/go/overrides.scm diff --git a/crates/zed/src/languages/gomod/config.toml b/crates/languages/src/gomod/config.toml similarity index 100% rename from crates/zed/src/languages/gomod/config.toml rename to crates/languages/src/gomod/config.toml diff --git a/crates/zed/src/languages/gomod/highlights.scm b/crates/languages/src/gomod/highlights.scm similarity index 100% rename from crates/zed/src/languages/gomod/highlights.scm rename to crates/languages/src/gomod/highlights.scm diff --git a/crates/zed/src/languages/gomod/structure.scm b/crates/languages/src/gomod/structure.scm similarity index 100% rename from crates/zed/src/languages/gomod/structure.scm rename to crates/languages/src/gomod/structure.scm diff --git a/crates/zed/src/languages/gowork/config.toml b/crates/languages/src/gowork/config.toml similarity index 100% rename from crates/zed/src/languages/gowork/config.toml rename to crates/languages/src/gowork/config.toml diff --git a/crates/zed/src/languages/gowork/highlights.scm b/crates/languages/src/gowork/highlights.scm similarity index 100% rename from crates/zed/src/languages/gowork/highlights.scm rename to crates/languages/src/gowork/highlights.scm diff --git a/crates/zed/src/languages/haskell.rs b/crates/languages/src/haskell.rs similarity index 100% rename from crates/zed/src/languages/haskell.rs rename to crates/languages/src/haskell.rs diff --git a/crates/zed/src/languages/haskell/brackets.scm b/crates/languages/src/haskell/brackets.scm similarity index 100% rename from crates/zed/src/languages/haskell/brackets.scm rename to crates/languages/src/haskell/brackets.scm diff --git a/crates/zed/src/languages/haskell/config.toml b/crates/languages/src/haskell/config.toml similarity index 100% rename from crates/zed/src/languages/haskell/config.toml rename to crates/languages/src/haskell/config.toml diff --git a/crates/zed/src/languages/haskell/highlights.scm b/crates/languages/src/haskell/highlights.scm similarity index 100% rename from crates/zed/src/languages/haskell/highlights.scm rename to crates/languages/src/haskell/highlights.scm diff --git a/crates/zed/src/languages/haskell/indents.scm b/crates/languages/src/haskell/indents.scm similarity index 100% rename from crates/zed/src/languages/haskell/indents.scm rename to crates/languages/src/haskell/indents.scm diff --git a/crates/zed/src/languages/haskell/outline.scm b/crates/languages/src/haskell/outline.scm similarity index 100% rename from crates/zed/src/languages/haskell/outline.scm rename to crates/languages/src/haskell/outline.scm diff --git a/crates/zed/src/languages/hcl/config.toml b/crates/languages/src/hcl/config.toml similarity index 100% rename from crates/zed/src/languages/hcl/config.toml rename to crates/languages/src/hcl/config.toml diff --git a/crates/zed/src/languages/hcl/highlights.scm b/crates/languages/src/hcl/highlights.scm similarity index 100% rename from crates/zed/src/languages/hcl/highlights.scm rename to crates/languages/src/hcl/highlights.scm diff --git a/crates/zed/src/languages/hcl/indents.scm b/crates/languages/src/hcl/indents.scm similarity index 100% rename from crates/zed/src/languages/hcl/indents.scm rename to crates/languages/src/hcl/indents.scm diff --git a/crates/zed/src/languages/hcl/injections.scm b/crates/languages/src/hcl/injections.scm similarity index 100% rename from crates/zed/src/languages/hcl/injections.scm rename to crates/languages/src/hcl/injections.scm diff --git a/crates/zed/src/languages/heex/config.toml b/crates/languages/src/heex/config.toml similarity index 100% rename from crates/zed/src/languages/heex/config.toml rename to crates/languages/src/heex/config.toml diff --git a/crates/zed/src/languages/heex/highlights.scm b/crates/languages/src/heex/highlights.scm similarity index 100% rename from crates/zed/src/languages/heex/highlights.scm rename to crates/languages/src/heex/highlights.scm diff --git a/crates/zed/src/languages/heex/injections.scm b/crates/languages/src/heex/injections.scm similarity index 100% rename from crates/zed/src/languages/heex/injections.scm rename to crates/languages/src/heex/injections.scm diff --git a/crates/zed/src/languages/heex/overrides.scm b/crates/languages/src/heex/overrides.scm similarity index 100% rename from crates/zed/src/languages/heex/overrides.scm rename to crates/languages/src/heex/overrides.scm diff --git a/crates/zed/src/languages/html.rs b/crates/languages/src/html.rs similarity index 100% rename from crates/zed/src/languages/html.rs rename to crates/languages/src/html.rs diff --git a/crates/zed/src/languages/html/brackets.scm b/crates/languages/src/html/brackets.scm similarity index 100% rename from crates/zed/src/languages/html/brackets.scm rename to crates/languages/src/html/brackets.scm diff --git a/crates/zed/src/languages/html/config.toml b/crates/languages/src/html/config.toml similarity index 100% rename from crates/zed/src/languages/html/config.toml rename to crates/languages/src/html/config.toml diff --git a/crates/zed/src/languages/html/highlights.scm b/crates/languages/src/html/highlights.scm similarity index 100% rename from crates/zed/src/languages/html/highlights.scm rename to crates/languages/src/html/highlights.scm diff --git a/crates/zed/src/languages/html/indents.scm b/crates/languages/src/html/indents.scm similarity index 100% rename from crates/zed/src/languages/html/indents.scm rename to crates/languages/src/html/indents.scm diff --git a/crates/zed/src/languages/html/injections.scm b/crates/languages/src/html/injections.scm similarity index 100% rename from crates/zed/src/languages/html/injections.scm rename to crates/languages/src/html/injections.scm diff --git a/crates/zed/src/languages/html/outline.scm b/crates/languages/src/html/outline.scm similarity index 100% rename from crates/zed/src/languages/html/outline.scm rename to crates/languages/src/html/outline.scm diff --git a/crates/zed/src/languages/html/overrides.scm b/crates/languages/src/html/overrides.scm similarity index 100% rename from crates/zed/src/languages/html/overrides.scm rename to crates/languages/src/html/overrides.scm diff --git a/crates/zed/src/languages/javascript/brackets.scm b/crates/languages/src/javascript/brackets.scm similarity index 100% rename from crates/zed/src/languages/javascript/brackets.scm rename to crates/languages/src/javascript/brackets.scm diff --git a/crates/zed/src/languages/javascript/config.toml b/crates/languages/src/javascript/config.toml similarity index 100% rename from crates/zed/src/languages/javascript/config.toml rename to crates/languages/src/javascript/config.toml diff --git a/crates/zed/src/languages/javascript/contexts.scm b/crates/languages/src/javascript/contexts.scm similarity index 100% rename from crates/zed/src/languages/javascript/contexts.scm rename to crates/languages/src/javascript/contexts.scm diff --git a/crates/zed/src/languages/javascript/embedding.scm b/crates/languages/src/javascript/embedding.scm similarity index 100% rename from crates/zed/src/languages/javascript/embedding.scm rename to crates/languages/src/javascript/embedding.scm diff --git a/crates/zed/src/languages/javascript/highlights.scm b/crates/languages/src/javascript/highlights.scm similarity index 100% rename from crates/zed/src/languages/javascript/highlights.scm rename to crates/languages/src/javascript/highlights.scm diff --git a/crates/zed/src/languages/javascript/indents.scm b/crates/languages/src/javascript/indents.scm similarity index 100% rename from crates/zed/src/languages/javascript/indents.scm rename to crates/languages/src/javascript/indents.scm diff --git a/crates/zed/src/languages/javascript/outline.scm b/crates/languages/src/javascript/outline.scm similarity index 100% rename from crates/zed/src/languages/javascript/outline.scm rename to crates/languages/src/javascript/outline.scm diff --git a/crates/zed/src/languages/javascript/overrides.scm b/crates/languages/src/javascript/overrides.scm similarity index 100% rename from crates/zed/src/languages/javascript/overrides.scm rename to crates/languages/src/javascript/overrides.scm diff --git a/crates/zed/src/languages/json.rs b/crates/languages/src/json.rs similarity index 100% rename from crates/zed/src/languages/json.rs rename to crates/languages/src/json.rs diff --git a/crates/zed/src/languages/json/brackets.scm b/crates/languages/src/json/brackets.scm similarity index 100% rename from crates/zed/src/languages/json/brackets.scm rename to crates/languages/src/json/brackets.scm diff --git a/crates/zed/src/languages/json/config.toml b/crates/languages/src/json/config.toml similarity index 100% rename from crates/zed/src/languages/json/config.toml rename to crates/languages/src/json/config.toml diff --git a/crates/zed/src/languages/json/embedding.scm b/crates/languages/src/json/embedding.scm similarity index 100% rename from crates/zed/src/languages/json/embedding.scm rename to crates/languages/src/json/embedding.scm diff --git a/crates/zed/src/languages/json/highlights.scm b/crates/languages/src/json/highlights.scm similarity index 100% rename from crates/zed/src/languages/json/highlights.scm rename to crates/languages/src/json/highlights.scm diff --git a/crates/zed/src/languages/json/indents.scm b/crates/languages/src/json/indents.scm similarity index 100% rename from crates/zed/src/languages/json/indents.scm rename to crates/languages/src/json/indents.scm diff --git a/crates/zed/src/languages/json/outline.scm b/crates/languages/src/json/outline.scm similarity index 100% rename from crates/zed/src/languages/json/outline.scm rename to crates/languages/src/json/outline.scm diff --git a/crates/zed/src/languages/json/overrides.scm b/crates/languages/src/json/overrides.scm similarity index 100% rename from crates/zed/src/languages/json/overrides.scm rename to crates/languages/src/json/overrides.scm diff --git a/crates/zed/src/languages/json/redactions.scm b/crates/languages/src/json/redactions.scm similarity index 100% rename from crates/zed/src/languages/json/redactions.scm rename to crates/languages/src/json/redactions.scm diff --git a/crates/zed/src/languages/language_plugin.rs b/crates/languages/src/language_plugin.rs similarity index 100% rename from crates/zed/src/languages/language_plugin.rs rename to crates/languages/src/language_plugin.rs diff --git a/crates/zed/src/languages.rs b/crates/languages/src/lib.rs similarity index 99% rename from crates/zed/src/languages.rs rename to crates/languages/src/lib.rs index f90b31364d..6ca89e53da 100644 --- a/crates/zed/src/languages.rs +++ b/crates/languages/src/lib.rs @@ -55,7 +55,7 @@ mod zig; // 6. If the language has injections add an injections.scm query file #[derive(RustEmbed)] -#[folder = "src/languages"] +#[folder = "src/"] #[exclude = "*.rs"] struct LanguageDir; diff --git a/crates/zed/src/languages/lua.rs b/crates/languages/src/lua.rs similarity index 100% rename from crates/zed/src/languages/lua.rs rename to crates/languages/src/lua.rs diff --git a/crates/zed/src/languages/lua/brackets.scm b/crates/languages/src/lua/brackets.scm similarity index 100% rename from crates/zed/src/languages/lua/brackets.scm rename to crates/languages/src/lua/brackets.scm diff --git a/crates/zed/src/languages/lua/config.toml b/crates/languages/src/lua/config.toml similarity index 100% rename from crates/zed/src/languages/lua/config.toml rename to crates/languages/src/lua/config.toml diff --git a/crates/zed/src/languages/lua/embedding.scm b/crates/languages/src/lua/embedding.scm similarity index 100% rename from crates/zed/src/languages/lua/embedding.scm rename to crates/languages/src/lua/embedding.scm diff --git a/crates/zed/src/languages/lua/highlights.scm b/crates/languages/src/lua/highlights.scm similarity index 100% rename from crates/zed/src/languages/lua/highlights.scm rename to crates/languages/src/lua/highlights.scm diff --git a/crates/zed/src/languages/lua/indents.scm b/crates/languages/src/lua/indents.scm similarity index 100% rename from crates/zed/src/languages/lua/indents.scm rename to crates/languages/src/lua/indents.scm diff --git a/crates/zed/src/languages/lua/outline.scm b/crates/languages/src/lua/outline.scm similarity index 100% rename from crates/zed/src/languages/lua/outline.scm rename to crates/languages/src/lua/outline.scm diff --git a/crates/zed/src/languages/markdown/config.toml b/crates/languages/src/markdown/config.toml similarity index 100% rename from crates/zed/src/languages/markdown/config.toml rename to crates/languages/src/markdown/config.toml diff --git a/crates/zed/src/languages/markdown/highlights.scm b/crates/languages/src/markdown/highlights.scm similarity index 100% rename from crates/zed/src/languages/markdown/highlights.scm rename to crates/languages/src/markdown/highlights.scm diff --git a/crates/zed/src/languages/markdown/injections.scm b/crates/languages/src/markdown/injections.scm similarity index 100% rename from crates/zed/src/languages/markdown/injections.scm rename to crates/languages/src/markdown/injections.scm diff --git a/crates/zed/src/languages/markdown/outline.scm b/crates/languages/src/markdown/outline.scm similarity index 100% rename from crates/zed/src/languages/markdown/outline.scm rename to crates/languages/src/markdown/outline.scm diff --git a/crates/zed/src/languages/nix/config.toml b/crates/languages/src/nix/config.toml similarity index 100% rename from crates/zed/src/languages/nix/config.toml rename to crates/languages/src/nix/config.toml diff --git a/crates/zed/src/languages/nix/highlights.scm b/crates/languages/src/nix/highlights.scm similarity index 100% rename from crates/zed/src/languages/nix/highlights.scm rename to crates/languages/src/nix/highlights.scm diff --git a/crates/zed/src/languages/nu.rs b/crates/languages/src/nu.rs similarity index 100% rename from crates/zed/src/languages/nu.rs rename to crates/languages/src/nu.rs diff --git a/crates/zed/src/languages/nu/brackets.scm b/crates/languages/src/nu/brackets.scm similarity index 100% rename from crates/zed/src/languages/nu/brackets.scm rename to crates/languages/src/nu/brackets.scm diff --git a/crates/zed/src/languages/nu/config.toml b/crates/languages/src/nu/config.toml similarity index 100% rename from crates/zed/src/languages/nu/config.toml rename to crates/languages/src/nu/config.toml diff --git a/crates/zed/src/languages/nu/highlights.scm b/crates/languages/src/nu/highlights.scm similarity index 100% rename from crates/zed/src/languages/nu/highlights.scm rename to crates/languages/src/nu/highlights.scm diff --git a/crates/zed/src/languages/nu/indents.scm b/crates/languages/src/nu/indents.scm similarity index 100% rename from crates/zed/src/languages/nu/indents.scm rename to crates/languages/src/nu/indents.scm diff --git a/crates/zed/src/languages/ocaml-interface/brackets.scm b/crates/languages/src/ocaml-interface/brackets.scm similarity index 100% rename from crates/zed/src/languages/ocaml-interface/brackets.scm rename to crates/languages/src/ocaml-interface/brackets.scm diff --git a/crates/zed/src/languages/ocaml-interface/config.toml b/crates/languages/src/ocaml-interface/config.toml similarity index 100% rename from crates/zed/src/languages/ocaml-interface/config.toml rename to crates/languages/src/ocaml-interface/config.toml diff --git a/crates/zed/src/languages/ocaml-interface/highlights.scm b/crates/languages/src/ocaml-interface/highlights.scm similarity index 100% rename from crates/zed/src/languages/ocaml-interface/highlights.scm rename to crates/languages/src/ocaml-interface/highlights.scm diff --git a/crates/zed/src/languages/ocaml-interface/indents.scm b/crates/languages/src/ocaml-interface/indents.scm similarity index 100% rename from crates/zed/src/languages/ocaml-interface/indents.scm rename to crates/languages/src/ocaml-interface/indents.scm diff --git a/crates/zed/src/languages/ocaml-interface/outline.scm b/crates/languages/src/ocaml-interface/outline.scm similarity index 100% rename from crates/zed/src/languages/ocaml-interface/outline.scm rename to crates/languages/src/ocaml-interface/outline.scm diff --git a/crates/zed/src/languages/ocaml.rs b/crates/languages/src/ocaml.rs similarity index 100% rename from crates/zed/src/languages/ocaml.rs rename to crates/languages/src/ocaml.rs diff --git a/crates/zed/src/languages/ocaml/brackets.scm b/crates/languages/src/ocaml/brackets.scm similarity index 100% rename from crates/zed/src/languages/ocaml/brackets.scm rename to crates/languages/src/ocaml/brackets.scm diff --git a/crates/zed/src/languages/ocaml/config.toml b/crates/languages/src/ocaml/config.toml similarity index 100% rename from crates/zed/src/languages/ocaml/config.toml rename to crates/languages/src/ocaml/config.toml diff --git a/crates/zed/src/languages/ocaml/highlights.scm b/crates/languages/src/ocaml/highlights.scm similarity index 100% rename from crates/zed/src/languages/ocaml/highlights.scm rename to crates/languages/src/ocaml/highlights.scm diff --git a/crates/zed/src/languages/ocaml/indents.scm b/crates/languages/src/ocaml/indents.scm similarity index 100% rename from crates/zed/src/languages/ocaml/indents.scm rename to crates/languages/src/ocaml/indents.scm diff --git a/crates/zed/src/languages/ocaml/outline.scm b/crates/languages/src/ocaml/outline.scm similarity index 100% rename from crates/zed/src/languages/ocaml/outline.scm rename to crates/languages/src/ocaml/outline.scm diff --git a/crates/zed/src/languages/php.rs b/crates/languages/src/php.rs similarity index 100% rename from crates/zed/src/languages/php.rs rename to crates/languages/src/php.rs diff --git a/crates/zed/src/languages/php/config.toml b/crates/languages/src/php/config.toml similarity index 100% rename from crates/zed/src/languages/php/config.toml rename to crates/languages/src/php/config.toml diff --git a/crates/zed/src/languages/php/embedding.scm b/crates/languages/src/php/embedding.scm similarity index 100% rename from crates/zed/src/languages/php/embedding.scm rename to crates/languages/src/php/embedding.scm diff --git a/crates/zed/src/languages/php/highlights.scm b/crates/languages/src/php/highlights.scm similarity index 100% rename from crates/zed/src/languages/php/highlights.scm rename to crates/languages/src/php/highlights.scm diff --git a/crates/zed/src/languages/php/injections.scm b/crates/languages/src/php/injections.scm similarity index 100% rename from crates/zed/src/languages/php/injections.scm rename to crates/languages/src/php/injections.scm diff --git a/crates/zed/src/languages/php/outline.scm b/crates/languages/src/php/outline.scm similarity index 100% rename from crates/zed/src/languages/php/outline.scm rename to crates/languages/src/php/outline.scm diff --git a/crates/zed/src/languages/php/tags.scm b/crates/languages/src/php/tags.scm similarity index 100% rename from crates/zed/src/languages/php/tags.scm rename to crates/languages/src/php/tags.scm diff --git a/crates/zed/src/languages/prisma.rs b/crates/languages/src/prisma.rs similarity index 100% rename from crates/zed/src/languages/prisma.rs rename to crates/languages/src/prisma.rs diff --git a/crates/zed/src/languages/prisma/config.toml b/crates/languages/src/prisma/config.toml similarity index 100% rename from crates/zed/src/languages/prisma/config.toml rename to crates/languages/src/prisma/config.toml diff --git a/crates/zed/src/languages/prisma/highlights.scm b/crates/languages/src/prisma/highlights.scm similarity index 100% rename from crates/zed/src/languages/prisma/highlights.scm rename to crates/languages/src/prisma/highlights.scm diff --git a/crates/zed/src/languages/proto/config.toml b/crates/languages/src/proto/config.toml similarity index 100% rename from crates/zed/src/languages/proto/config.toml rename to crates/languages/src/proto/config.toml diff --git a/crates/zed/src/languages/proto/highlights.scm b/crates/languages/src/proto/highlights.scm similarity index 100% rename from crates/zed/src/languages/proto/highlights.scm rename to crates/languages/src/proto/highlights.scm diff --git a/crates/zed/src/languages/proto/outline.scm b/crates/languages/src/proto/outline.scm similarity index 100% rename from crates/zed/src/languages/proto/outline.scm rename to crates/languages/src/proto/outline.scm diff --git a/crates/zed/src/languages/purescript.rs b/crates/languages/src/purescript.rs similarity index 100% rename from crates/zed/src/languages/purescript.rs rename to crates/languages/src/purescript.rs diff --git a/crates/zed/src/languages/purescript/brackets.scm b/crates/languages/src/purescript/brackets.scm similarity index 100% rename from crates/zed/src/languages/purescript/brackets.scm rename to crates/languages/src/purescript/brackets.scm diff --git a/crates/zed/src/languages/purescript/config.toml b/crates/languages/src/purescript/config.toml similarity index 100% rename from crates/zed/src/languages/purescript/config.toml rename to crates/languages/src/purescript/config.toml diff --git a/crates/zed/src/languages/purescript/highlights.scm b/crates/languages/src/purescript/highlights.scm similarity index 100% rename from crates/zed/src/languages/purescript/highlights.scm rename to crates/languages/src/purescript/highlights.scm diff --git a/crates/zed/src/languages/purescript/indents.scm b/crates/languages/src/purescript/indents.scm similarity index 100% rename from crates/zed/src/languages/purescript/indents.scm rename to crates/languages/src/purescript/indents.scm diff --git a/crates/zed/src/languages/python.rs b/crates/languages/src/python.rs similarity index 99% rename from crates/zed/src/languages/python.rs rename to crates/languages/src/python.rs index 688bddfeec..1c56a57f04 100644 --- a/crates/zed/src/languages/python.rs +++ b/crates/languages/src/python.rs @@ -188,8 +188,7 @@ mod tests { #[gpui::test] async fn test_python_autoindent(cx: &mut TestAppContext) { cx.executor().set_block_on_ticks(usize::MAX..=usize::MAX); - let language = - crate::languages::language("python", tree_sitter_python::language(), None).await; + let language = crate::language("python", tree_sitter_python::language(), None).await; cx.update(|cx| { let test_settings = SettingsStore::test(cx); cx.set_global(test_settings); diff --git a/crates/zed/src/languages/python/brackets.scm b/crates/languages/src/python/brackets.scm similarity index 100% rename from crates/zed/src/languages/python/brackets.scm rename to crates/languages/src/python/brackets.scm diff --git a/crates/zed/src/languages/python/config.toml b/crates/languages/src/python/config.toml similarity index 100% rename from crates/zed/src/languages/python/config.toml rename to crates/languages/src/python/config.toml diff --git a/crates/zed/src/languages/python/embedding.scm b/crates/languages/src/python/embedding.scm similarity index 100% rename from crates/zed/src/languages/python/embedding.scm rename to crates/languages/src/python/embedding.scm diff --git a/crates/zed/src/languages/python/highlights.scm b/crates/languages/src/python/highlights.scm similarity index 100% rename from crates/zed/src/languages/python/highlights.scm rename to crates/languages/src/python/highlights.scm diff --git a/crates/zed/src/languages/python/indents.scm b/crates/languages/src/python/indents.scm similarity index 100% rename from crates/zed/src/languages/python/indents.scm rename to crates/languages/src/python/indents.scm diff --git a/crates/zed/src/languages/python/outline.scm b/crates/languages/src/python/outline.scm similarity index 100% rename from crates/zed/src/languages/python/outline.scm rename to crates/languages/src/python/outline.scm diff --git a/crates/zed/src/languages/python/overrides.scm b/crates/languages/src/python/overrides.scm similarity index 100% rename from crates/zed/src/languages/python/overrides.scm rename to crates/languages/src/python/overrides.scm diff --git a/crates/zed/src/languages/racket/brackets.scm b/crates/languages/src/racket/brackets.scm similarity index 100% rename from crates/zed/src/languages/racket/brackets.scm rename to crates/languages/src/racket/brackets.scm diff --git a/crates/zed/src/languages/racket/config.toml b/crates/languages/src/racket/config.toml similarity index 100% rename from crates/zed/src/languages/racket/config.toml rename to crates/languages/src/racket/config.toml diff --git a/crates/zed/src/languages/racket/highlights.scm b/crates/languages/src/racket/highlights.scm similarity index 100% rename from crates/zed/src/languages/racket/highlights.scm rename to crates/languages/src/racket/highlights.scm diff --git a/crates/zed/src/languages/racket/indents.scm b/crates/languages/src/racket/indents.scm similarity index 100% rename from crates/zed/src/languages/racket/indents.scm rename to crates/languages/src/racket/indents.scm diff --git a/crates/zed/src/languages/racket/outline.scm b/crates/languages/src/racket/outline.scm similarity index 100% rename from crates/zed/src/languages/racket/outline.scm rename to crates/languages/src/racket/outline.scm diff --git a/crates/zed/src/languages/ruby.rs b/crates/languages/src/ruby.rs similarity index 100% rename from crates/zed/src/languages/ruby.rs rename to crates/languages/src/ruby.rs diff --git a/crates/zed/src/languages/ruby/brackets.scm b/crates/languages/src/ruby/brackets.scm similarity index 100% rename from crates/zed/src/languages/ruby/brackets.scm rename to crates/languages/src/ruby/brackets.scm diff --git a/crates/zed/src/languages/ruby/config.toml b/crates/languages/src/ruby/config.toml similarity index 100% rename from crates/zed/src/languages/ruby/config.toml rename to crates/languages/src/ruby/config.toml diff --git a/crates/zed/src/languages/ruby/embedding.scm b/crates/languages/src/ruby/embedding.scm similarity index 100% rename from crates/zed/src/languages/ruby/embedding.scm rename to crates/languages/src/ruby/embedding.scm diff --git a/crates/zed/src/languages/ruby/highlights.scm b/crates/languages/src/ruby/highlights.scm similarity index 100% rename from crates/zed/src/languages/ruby/highlights.scm rename to crates/languages/src/ruby/highlights.scm diff --git a/crates/zed/src/languages/ruby/indents.scm b/crates/languages/src/ruby/indents.scm similarity index 100% rename from crates/zed/src/languages/ruby/indents.scm rename to crates/languages/src/ruby/indents.scm diff --git a/crates/zed/src/languages/ruby/outline.scm b/crates/languages/src/ruby/outline.scm similarity index 100% rename from crates/zed/src/languages/ruby/outline.scm rename to crates/languages/src/ruby/outline.scm diff --git a/crates/zed/src/languages/ruby/overrides.scm b/crates/languages/src/ruby/overrides.scm similarity index 100% rename from crates/zed/src/languages/ruby/overrides.scm rename to crates/languages/src/ruby/overrides.scm diff --git a/crates/zed/src/languages/rust.rs b/crates/languages/src/rust.rs similarity index 99% rename from crates/zed/src/languages/rust.rs rename to crates/languages/src/rust.rs index 0c73ff9881..e375e5e831 100644 --- a/crates/zed/src/languages/rust.rs +++ b/crates/languages/src/rust.rs @@ -310,7 +310,7 @@ mod tests { use std::num::NonZeroU32; use super::*; - use crate::languages::language; + use crate::language; use gpui::{Context, Hsla, TestAppContext}; use language::language_settings::AllLanguageSettings; use settings::SettingsStore; @@ -524,7 +524,7 @@ mod tests { }); }); - let language = crate::languages::language("rust", tree_sitter_rust::language(), None).await; + let language = crate::language("rust", tree_sitter_rust::language(), None).await; cx.new_model(|cx| { let mut buffer = Buffer::new(0, BufferId::new(cx.entity_id().as_u64()).unwrap(), "") diff --git a/crates/zed/src/languages/rust/brackets.scm b/crates/languages/src/rust/brackets.scm similarity index 100% rename from crates/zed/src/languages/rust/brackets.scm rename to crates/languages/src/rust/brackets.scm diff --git a/crates/zed/src/languages/rust/config.toml b/crates/languages/src/rust/config.toml similarity index 100% rename from crates/zed/src/languages/rust/config.toml rename to crates/languages/src/rust/config.toml diff --git a/crates/zed/src/languages/rust/embedding.scm b/crates/languages/src/rust/embedding.scm similarity index 100% rename from crates/zed/src/languages/rust/embedding.scm rename to crates/languages/src/rust/embedding.scm diff --git a/crates/zed/src/languages/rust/highlights.scm b/crates/languages/src/rust/highlights.scm similarity index 100% rename from crates/zed/src/languages/rust/highlights.scm rename to crates/languages/src/rust/highlights.scm diff --git a/crates/zed/src/languages/rust/indents.scm b/crates/languages/src/rust/indents.scm similarity index 100% rename from crates/zed/src/languages/rust/indents.scm rename to crates/languages/src/rust/indents.scm diff --git a/crates/zed/src/languages/rust/injections.scm b/crates/languages/src/rust/injections.scm similarity index 100% rename from crates/zed/src/languages/rust/injections.scm rename to crates/languages/src/rust/injections.scm diff --git a/crates/zed/src/languages/rust/outline.scm b/crates/languages/src/rust/outline.scm similarity index 100% rename from crates/zed/src/languages/rust/outline.scm rename to crates/languages/src/rust/outline.scm diff --git a/crates/zed/src/languages/rust/overrides.scm b/crates/languages/src/rust/overrides.scm similarity index 100% rename from crates/zed/src/languages/rust/overrides.scm rename to crates/languages/src/rust/overrides.scm diff --git a/crates/zed/src/languages/scheme/brackets.scm b/crates/languages/src/scheme/brackets.scm similarity index 100% rename from crates/zed/src/languages/scheme/brackets.scm rename to crates/languages/src/scheme/brackets.scm diff --git a/crates/zed/src/languages/scheme/config.toml b/crates/languages/src/scheme/config.toml similarity index 100% rename from crates/zed/src/languages/scheme/config.toml rename to crates/languages/src/scheme/config.toml diff --git a/crates/zed/src/languages/scheme/highlights.scm b/crates/languages/src/scheme/highlights.scm similarity index 100% rename from crates/zed/src/languages/scheme/highlights.scm rename to crates/languages/src/scheme/highlights.scm diff --git a/crates/zed/src/languages/scheme/indents.scm b/crates/languages/src/scheme/indents.scm similarity index 100% rename from crates/zed/src/languages/scheme/indents.scm rename to crates/languages/src/scheme/indents.scm diff --git a/crates/zed/src/languages/scheme/outline.scm b/crates/languages/src/scheme/outline.scm similarity index 100% rename from crates/zed/src/languages/scheme/outline.scm rename to crates/languages/src/scheme/outline.scm diff --git a/crates/zed/src/languages/scheme/overrides.scm b/crates/languages/src/scheme/overrides.scm similarity index 100% rename from crates/zed/src/languages/scheme/overrides.scm rename to crates/languages/src/scheme/overrides.scm diff --git a/crates/zed/src/languages/svelte.rs b/crates/languages/src/svelte.rs similarity index 100% rename from crates/zed/src/languages/svelte.rs rename to crates/languages/src/svelte.rs diff --git a/crates/zed/src/languages/svelte/config.toml b/crates/languages/src/svelte/config.toml similarity index 100% rename from crates/zed/src/languages/svelte/config.toml rename to crates/languages/src/svelte/config.toml diff --git a/crates/zed/src/languages/svelte/folds.scm b/crates/languages/src/svelte/folds.scm similarity index 100% rename from crates/zed/src/languages/svelte/folds.scm rename to crates/languages/src/svelte/folds.scm diff --git a/crates/zed/src/languages/svelte/highlights.scm b/crates/languages/src/svelte/highlights.scm similarity index 100% rename from crates/zed/src/languages/svelte/highlights.scm rename to crates/languages/src/svelte/highlights.scm diff --git a/crates/zed/src/languages/svelte/indents.scm b/crates/languages/src/svelte/indents.scm similarity index 100% rename from crates/zed/src/languages/svelte/indents.scm rename to crates/languages/src/svelte/indents.scm diff --git a/crates/zed/src/languages/svelte/injections.scm b/crates/languages/src/svelte/injections.scm similarity index 100% rename from crates/zed/src/languages/svelte/injections.scm rename to crates/languages/src/svelte/injections.scm diff --git a/crates/zed/src/languages/svelte/overrides.scm b/crates/languages/src/svelte/overrides.scm similarity index 100% rename from crates/zed/src/languages/svelte/overrides.scm rename to crates/languages/src/svelte/overrides.scm diff --git a/crates/zed/src/languages/tailwind.rs b/crates/languages/src/tailwind.rs similarity index 100% rename from crates/zed/src/languages/tailwind.rs rename to crates/languages/src/tailwind.rs diff --git a/crates/zed/src/languages/terraform-vars/config.toml b/crates/languages/src/terraform-vars/config.toml similarity index 100% rename from crates/zed/src/languages/terraform-vars/config.toml rename to crates/languages/src/terraform-vars/config.toml diff --git a/crates/zed/src/languages/terraform-vars/highlights.scm b/crates/languages/src/terraform-vars/highlights.scm similarity index 100% rename from crates/zed/src/languages/terraform-vars/highlights.scm rename to crates/languages/src/terraform-vars/highlights.scm diff --git a/crates/zed/src/languages/terraform-vars/indents.scm b/crates/languages/src/terraform-vars/indents.scm similarity index 100% rename from crates/zed/src/languages/terraform-vars/indents.scm rename to crates/languages/src/terraform-vars/indents.scm diff --git a/crates/zed/src/languages/terraform-vars/injections.scm b/crates/languages/src/terraform-vars/injections.scm similarity index 100% rename from crates/zed/src/languages/terraform-vars/injections.scm rename to crates/languages/src/terraform-vars/injections.scm diff --git a/crates/zed/src/languages/terraform/config.toml b/crates/languages/src/terraform/config.toml similarity index 100% rename from crates/zed/src/languages/terraform/config.toml rename to crates/languages/src/terraform/config.toml diff --git a/crates/zed/src/languages/terraform/highlights.scm b/crates/languages/src/terraform/highlights.scm similarity index 100% rename from crates/zed/src/languages/terraform/highlights.scm rename to crates/languages/src/terraform/highlights.scm diff --git a/crates/zed/src/languages/terraform/indents.scm b/crates/languages/src/terraform/indents.scm similarity index 100% rename from crates/zed/src/languages/terraform/indents.scm rename to crates/languages/src/terraform/indents.scm diff --git a/crates/zed/src/languages/terraform/injections.scm b/crates/languages/src/terraform/injections.scm similarity index 100% rename from crates/zed/src/languages/terraform/injections.scm rename to crates/languages/src/terraform/injections.scm diff --git a/crates/zed/src/languages/toml.rs b/crates/languages/src/toml.rs similarity index 100% rename from crates/zed/src/languages/toml.rs rename to crates/languages/src/toml.rs diff --git a/crates/zed/src/languages/toml/brackets.scm b/crates/languages/src/toml/brackets.scm similarity index 100% rename from crates/zed/src/languages/toml/brackets.scm rename to crates/languages/src/toml/brackets.scm diff --git a/crates/zed/src/languages/toml/config.toml b/crates/languages/src/toml/config.toml similarity index 100% rename from crates/zed/src/languages/toml/config.toml rename to crates/languages/src/toml/config.toml diff --git a/crates/zed/src/languages/toml/highlights.scm b/crates/languages/src/toml/highlights.scm similarity index 100% rename from crates/zed/src/languages/toml/highlights.scm rename to crates/languages/src/toml/highlights.scm diff --git a/crates/zed/src/languages/toml/indents.scm b/crates/languages/src/toml/indents.scm similarity index 100% rename from crates/zed/src/languages/toml/indents.scm rename to crates/languages/src/toml/indents.scm diff --git a/crates/zed/src/languages/toml/outline.scm b/crates/languages/src/toml/outline.scm similarity index 100% rename from crates/zed/src/languages/toml/outline.scm rename to crates/languages/src/toml/outline.scm diff --git a/crates/zed/src/languages/toml/overrides.scm b/crates/languages/src/toml/overrides.scm similarity index 100% rename from crates/zed/src/languages/toml/overrides.scm rename to crates/languages/src/toml/overrides.scm diff --git a/crates/zed/src/languages/toml/redactions.scm b/crates/languages/src/toml/redactions.scm similarity index 100% rename from crates/zed/src/languages/toml/redactions.scm rename to crates/languages/src/toml/redactions.scm diff --git a/crates/zed/src/languages/tsx/brackets.scm b/crates/languages/src/tsx/brackets.scm similarity index 100% rename from crates/zed/src/languages/tsx/brackets.scm rename to crates/languages/src/tsx/brackets.scm diff --git a/crates/zed/src/languages/tsx/config.toml b/crates/languages/src/tsx/config.toml similarity index 100% rename from crates/zed/src/languages/tsx/config.toml rename to crates/languages/src/tsx/config.toml diff --git a/crates/zed/src/languages/tsx/embedding.scm b/crates/languages/src/tsx/embedding.scm similarity index 100% rename from crates/zed/src/languages/tsx/embedding.scm rename to crates/languages/src/tsx/embedding.scm diff --git a/crates/zed/src/languages/tsx/highlights-jsx.scm b/crates/languages/src/tsx/highlights-jsx.scm similarity index 100% rename from crates/zed/src/languages/tsx/highlights-jsx.scm rename to crates/languages/src/tsx/highlights-jsx.scm diff --git a/crates/zed/src/languages/tsx/highlights.scm b/crates/languages/src/tsx/highlights.scm similarity index 100% rename from crates/zed/src/languages/tsx/highlights.scm rename to crates/languages/src/tsx/highlights.scm diff --git a/crates/zed/src/languages/tsx/indents.scm b/crates/languages/src/tsx/indents.scm similarity index 100% rename from crates/zed/src/languages/tsx/indents.scm rename to crates/languages/src/tsx/indents.scm diff --git a/crates/zed/src/languages/tsx/outline.scm b/crates/languages/src/tsx/outline.scm similarity index 100% rename from crates/zed/src/languages/tsx/outline.scm rename to crates/languages/src/tsx/outline.scm diff --git a/crates/zed/src/languages/tsx/overrides.scm b/crates/languages/src/tsx/overrides.scm similarity index 100% rename from crates/zed/src/languages/tsx/overrides.scm rename to crates/languages/src/tsx/overrides.scm diff --git a/crates/zed/src/languages/typescript.rs b/crates/languages/src/typescript.rs similarity index 99% rename from crates/zed/src/languages/typescript.rs rename to crates/languages/src/typescript.rs index 07ae3b0c6c..4de20a1337 100644 --- a/crates/zed/src/languages/typescript.rs +++ b/crates/languages/src/typescript.rs @@ -378,7 +378,7 @@ mod tests { #[gpui::test] async fn test_outline(cx: &mut TestAppContext) { - let language = crate::languages::language( + let language = crate::language( "typescript", tree_sitter_typescript::language_typescript(), None, diff --git a/crates/zed/src/languages/typescript/brackets.scm b/crates/languages/src/typescript/brackets.scm similarity index 100% rename from crates/zed/src/languages/typescript/brackets.scm rename to crates/languages/src/typescript/brackets.scm diff --git a/crates/zed/src/languages/typescript/config.toml b/crates/languages/src/typescript/config.toml similarity index 100% rename from crates/zed/src/languages/typescript/config.toml rename to crates/languages/src/typescript/config.toml diff --git a/crates/zed/src/languages/typescript/embedding.scm b/crates/languages/src/typescript/embedding.scm similarity index 100% rename from crates/zed/src/languages/typescript/embedding.scm rename to crates/languages/src/typescript/embedding.scm diff --git a/crates/zed/src/languages/typescript/highlights.scm b/crates/languages/src/typescript/highlights.scm similarity index 100% rename from crates/zed/src/languages/typescript/highlights.scm rename to crates/languages/src/typescript/highlights.scm diff --git a/crates/zed/src/languages/typescript/indents.scm b/crates/languages/src/typescript/indents.scm similarity index 100% rename from crates/zed/src/languages/typescript/indents.scm rename to crates/languages/src/typescript/indents.scm diff --git a/crates/zed/src/languages/typescript/outline.scm b/crates/languages/src/typescript/outline.scm similarity index 100% rename from crates/zed/src/languages/typescript/outline.scm rename to crates/languages/src/typescript/outline.scm diff --git a/crates/zed/src/languages/typescript/overrides.scm b/crates/languages/src/typescript/overrides.scm similarity index 100% rename from crates/zed/src/languages/typescript/overrides.scm rename to crates/languages/src/typescript/overrides.scm diff --git a/crates/zed/src/languages/uiua.rs b/crates/languages/src/uiua.rs similarity index 100% rename from crates/zed/src/languages/uiua.rs rename to crates/languages/src/uiua.rs diff --git a/crates/zed/src/languages/uiua/config.toml b/crates/languages/src/uiua/config.toml similarity index 100% rename from crates/zed/src/languages/uiua/config.toml rename to crates/languages/src/uiua/config.toml diff --git a/crates/zed/src/languages/uiua/highlights.scm b/crates/languages/src/uiua/highlights.scm similarity index 100% rename from crates/zed/src/languages/uiua/highlights.scm rename to crates/languages/src/uiua/highlights.scm diff --git a/crates/zed/src/languages/uiua/indents.scm b/crates/languages/src/uiua/indents.scm similarity index 100% rename from crates/zed/src/languages/uiua/indents.scm rename to crates/languages/src/uiua/indents.scm diff --git a/crates/zed/src/languages/vue.rs b/crates/languages/src/vue.rs similarity index 100% rename from crates/zed/src/languages/vue.rs rename to crates/languages/src/vue.rs diff --git a/crates/zed/src/languages/vue/brackets.scm b/crates/languages/src/vue/brackets.scm similarity index 100% rename from crates/zed/src/languages/vue/brackets.scm rename to crates/languages/src/vue/brackets.scm diff --git a/crates/zed/src/languages/vue/config.toml b/crates/languages/src/vue/config.toml similarity index 100% rename from crates/zed/src/languages/vue/config.toml rename to crates/languages/src/vue/config.toml diff --git a/crates/zed/src/languages/vue/highlights.scm b/crates/languages/src/vue/highlights.scm similarity index 100% rename from crates/zed/src/languages/vue/highlights.scm rename to crates/languages/src/vue/highlights.scm diff --git a/crates/zed/src/languages/vue/injections.scm b/crates/languages/src/vue/injections.scm similarity index 100% rename from crates/zed/src/languages/vue/injections.scm rename to crates/languages/src/vue/injections.scm diff --git a/crates/zed/src/languages/yaml.rs b/crates/languages/src/yaml.rs similarity index 100% rename from crates/zed/src/languages/yaml.rs rename to crates/languages/src/yaml.rs diff --git a/crates/zed/src/languages/yaml/brackets.scm b/crates/languages/src/yaml/brackets.scm similarity index 100% rename from crates/zed/src/languages/yaml/brackets.scm rename to crates/languages/src/yaml/brackets.scm diff --git a/crates/zed/src/languages/yaml/config.toml b/crates/languages/src/yaml/config.toml similarity index 100% rename from crates/zed/src/languages/yaml/config.toml rename to crates/languages/src/yaml/config.toml diff --git a/crates/zed/src/languages/yaml/highlights.scm b/crates/languages/src/yaml/highlights.scm similarity index 100% rename from crates/zed/src/languages/yaml/highlights.scm rename to crates/languages/src/yaml/highlights.scm diff --git a/crates/zed/src/languages/yaml/outline.scm b/crates/languages/src/yaml/outline.scm similarity index 100% rename from crates/zed/src/languages/yaml/outline.scm rename to crates/languages/src/yaml/outline.scm diff --git a/crates/zed/src/languages/yaml/redactions.scm b/crates/languages/src/yaml/redactions.scm similarity index 100% rename from crates/zed/src/languages/yaml/redactions.scm rename to crates/languages/src/yaml/redactions.scm diff --git a/crates/zed/src/languages/zig.rs b/crates/languages/src/zig.rs similarity index 100% rename from crates/zed/src/languages/zig.rs rename to crates/languages/src/zig.rs diff --git a/crates/zed/src/languages/zig/brackets.scm b/crates/languages/src/zig/brackets.scm similarity index 100% rename from crates/zed/src/languages/zig/brackets.scm rename to crates/languages/src/zig/brackets.scm diff --git a/crates/zed/src/languages/zig/config.toml b/crates/languages/src/zig/config.toml similarity index 100% rename from crates/zed/src/languages/zig/config.toml rename to crates/languages/src/zig/config.toml diff --git a/crates/zed/src/languages/zig/folds.scm b/crates/languages/src/zig/folds.scm similarity index 100% rename from crates/zed/src/languages/zig/folds.scm rename to crates/languages/src/zig/folds.scm diff --git a/crates/zed/src/languages/zig/highlights.scm b/crates/languages/src/zig/highlights.scm similarity index 100% rename from crates/zed/src/languages/zig/highlights.scm rename to crates/languages/src/zig/highlights.scm diff --git a/crates/zed/src/languages/zig/indents.scm b/crates/languages/src/zig/indents.scm similarity index 100% rename from crates/zed/src/languages/zig/indents.scm rename to crates/languages/src/zig/indents.scm diff --git a/crates/zed/src/languages/zig/injections.scm b/crates/languages/src/zig/injections.scm similarity index 100% rename from crates/zed/src/languages/zig/injections.scm rename to crates/languages/src/zig/injections.scm diff --git a/crates/recent_projects/Cargo.toml b/crates/recent_projects/Cargo.toml index 600a144f13..241cd69442 100644 --- a/crates/recent_projects/Cargo.toml +++ b/crates/recent_projects/Cargo.toml @@ -10,7 +10,6 @@ path = "src/recent_projects.rs" doctest = false [dependencies] -editor.workspace = true futures.workspace = true fuzzy.workspace = true gpui.workspace = true @@ -26,6 +25,3 @@ theme.workspace = true ui.workspace = true util.workspace = true workspace.workspace = true - -[dev-dependencies] -editor = { workspace = true, features = ["test-support"] } diff --git a/crates/tasks_ui/Cargo.toml b/crates/tasks_ui/Cargo.toml index d72ab1e385..fde8e83747 100644 --- a/crates/tasks_ui/Cargo.toml +++ b/crates/tasks_ui/Cargo.toml @@ -8,7 +8,6 @@ license = "GPL-3.0-or-later" [dependencies] anyhow.workspace = true db.workspace = true -editor.workspace = true fs.workspace = true futures.workspace = true fuzzy.workspace = true diff --git a/crates/theme_selector/Cargo.toml b/crates/theme_selector/Cargo.toml index 869204be07..5de6a8e87b 100644 --- a/crates/theme_selector/Cargo.toml +++ b/crates/theme_selector/Cargo.toml @@ -11,7 +11,6 @@ doctest = false [dependencies] client.workspace = true -editor.workspace = true feature_flags.workspace = true fs.workspace = true fuzzy.workspace = true diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index 78f8eb97fb..59ecc4f86a 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -113,52 +113,6 @@ theme_selector.workspace = true thiserror.workspace = true tiny_http = "0.8" toml.workspace = true -tree-sitter-astro.workspace = true -tree-sitter-bash.workspace = true -tree-sitter-c-sharp.workspace = true -tree-sitter-c.workspace = true -tree-sitter-clojure.workspace = true -tree-sitter-cpp.workspace = true -tree-sitter-css.workspace = true -tree-sitter-dockerfile.workspace = true -tree-sitter-dart.workspace = true -tree-sitter-elixir.workspace = true -tree-sitter-elm.workspace = true -tree-sitter-embedded-template.workspace = true -tree-sitter-erlang.workspace = true -tree-sitter-gitcommit.workspace = true -tree-sitter-gleam.workspace = true -tree-sitter-glsl.workspace = true -tree-sitter-go.workspace = true -tree-sitter-gomod.workspace = true -tree-sitter-gowork.workspace = true -tree-sitter-haskell.workspace = true -tree-sitter-hcl.workspace = true -tree-sitter-heex.workspace = true -tree-sitter-html.workspace = true -tree-sitter-json.workspace = true -tree-sitter-lua.workspace = true -tree-sitter-markdown.workspace = true -tree-sitter-nix.workspace = true -tree-sitter-nu.workspace = true -tree-sitter-ocaml.workspace = true -tree-sitter-php.workspace = true -tree-sitter-prisma-io.workspace = true -tree-sitter-proto.workspace = true -tree-sitter-purescript.workspace = true -tree-sitter-python.workspace = true -tree-sitter-racket.workspace = true -tree-sitter-ruby.workspace = true -tree-sitter-rust.workspace = true -tree-sitter-scheme.workspace = true -tree-sitter-svelte.workspace = true -tree-sitter-toml.workspace = true -tree-sitter-typescript.workspace = true -tree-sitter-uiua.workspace = true -tree-sitter-vue.workspace = true -tree-sitter-yaml.workspace = true -tree-sitter-zig.workspace = true -tree-sitter.workspace = true url.workspace = true urlencoding = "2.1.2" util.workspace = true @@ -167,6 +121,8 @@ vim.workspace = true welcome.workspace = true workspace.workspace = true zed_actions.workspace = true +languages = { version = "0.1.0", path = "../languages" } + [dev-dependencies] call = { workspace = true, features = ["test-support"] } @@ -175,6 +131,7 @@ gpui = { workspace = true, features = ["test-support"] } language = { workspace = true, features = ["test-support"] } project = { workspace = true, features = ["test-support"] } text = { workspace = true, features = ["test-support"] } +tree-sitter-rust.workspace = true unindent.workspace = true workspace = { workspace = true, features = ["test-support"] } diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index e0a5d3eff8..509ba772ab 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -55,8 +55,7 @@ use welcome::{show_welcome_view, BaseKeymap, FIRST_OPEN}; use workspace::{AppState, WorkspaceStore}; use zed::{ app_menus, build_window_options, ensure_only_instance, handle_cli_connection, - handle_keymap_file_changes, initialize_workspace, languages, IsOnlyInstance, OpenListener, - OpenRequest, + handle_keymap_file_changes, initialize_workspace, IsOnlyInstance, OpenListener, OpenRequest, }; #[global_allocator] diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index c55052f7f0..e52c0695c9 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -1,5 +1,4 @@ mod app_menus; -pub mod languages; mod only_instance; mod open_listener; diff --git a/typos.toml b/typos.toml index b05a1e1b83..0923d130c9 100644 --- a/typos.toml +++ b/typos.toml @@ -4,7 +4,7 @@ ignore-hidden = false extend-exclude = [ ".git/", # glsl isn't recognized by this tool - "crates/zed/src/languages/glsl/", + "crates/languages/src/glsl/", # File suffixes aren't typos "assets/icons/file_icons/file_types.json", # Not our typos