diff --git a/Cargo.lock b/Cargo.lock index dd17a04..a699328 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,16 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "adapter-example" +version = "0.1.0" +dependencies = [ + "etymora-traits", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "addr2line" version = "0.24.2" @@ -287,10 +297,10 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" name = "etymora" version = "0.1.0" dependencies = [ + "adapter-example", "clap", "either", "etymora-traits", - "example-adapter", "jemallocator", "lsp-server", "lsp-types", @@ -312,16 +322,6 @@ dependencies = [ "markdown-builder", ] -[[package]] -name = "example-adapter" -version = "0.1.0" -dependencies = [ - "etymora-traits", - "thiserror", - "tokio", - "tracing", -] - [[package]] name = "fluent-uri" version = "0.1.4" diff --git a/crates/example-adapter/Cargo.toml b/crates/adapter-example/Cargo.toml similarity index 90% rename from crates/example-adapter/Cargo.toml rename to crates/adapter-example/Cargo.toml index e9617d1..016bf5e 100644 --- a/crates/example-adapter/Cargo.toml +++ b/crates/adapter-example/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "example-adapter" +name = "adapter-example" version.workspace = true authors.workspace = true edition.workspace = true diff --git a/crates/example-adapter/src/lib.rs b/crates/adapter-example/src/lib.rs similarity index 100% rename from crates/example-adapter/src/lib.rs rename to crates/adapter-example/src/lib.rs diff --git a/crates/etymora/Cargo.toml b/crates/etymora/Cargo.toml index d9fad40..8bef640 100644 --- a/crates/etymora/Cargo.toml +++ b/crates/etymora/Cargo.toml @@ -18,8 +18,8 @@ lsp-types.workspace = true serde = { version = "1.0", features = ["derive"] } serde_json = "1.0.133" +adapter-example = { path = "../adapter-example/" } etymora-traits = { path = "../etymora-traits/" } -example-adapter = { path = "../example-adapter/" } tokio.workspace = true diff --git a/crates/etymora/src/dict_handler.rs b/crates/etymora/src/dict_handler.rs index ba43b6b..6841ad6 100644 --- a/crates/etymora/src/dict_handler.rs +++ b/crates/etymora/src/dict_handler.rs @@ -2,7 +2,7 @@ use crate::error::EtymoraError; #[derive(Debug)] pub(crate) enum Dicts { - ExampleDict(example_adapter::ExampleDictionary), + ExampleDict(adapter_example::ExampleDictionary), } impl etymora_traits::Dictionary for Dicts { diff --git a/crates/etymora/src/error.rs b/crates/etymora/src/error.rs index 3c5c2a7..6bf1a4d 100644 --- a/crates/etymora/src/error.rs +++ b/crates/etymora/src/error.rs @@ -6,7 +6,7 @@ pub(crate) type Result = std::result::Result; #[derive(Debug, Error)] pub(crate) enum EtymoraError { #[error("{0}")] - ExampleAdapterError(#[source] example_adapter::ExampleError), + ExampleAdapterError(#[source] adapter_example::ExampleError), #[error("{0}")] ProcotolError(#[source] lsp_server::ProtocolError), #[error("Error occurs in desirializing, this is a type of ProtocolError: {0}")]