mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-11 04:36:24 +00:00
This PR adds support for context servers provided by extensions. To provide a context server from an extension, you need to list the context servers in your `extension.toml`: ```toml [context_servers.my-context-server] ``` And then implement the `context_server_command` method to return the command that will be used to start the context server: ```rs use zed_extension_api::{self as zed, Command, ContextServerId, Result}; struct ExampleContextServerExtension; impl zed::Extension for ExampleContextServerExtension { fn new() -> Self { ExampleContextServerExtension } fn context_server_command(&mut self, _context_server_id: &ContextServerId) -> Result<Command> { Ok(Command { command: "node".to_string(), args: vec!["/path/to/example-context-server/index.js".to_string()], env: Vec::new(), }) } } zed::register_extension!(ExampleContextServerExtension); ``` Release Notes: - N/A
68 lines
1.8 KiB
TOML
68 lines
1.8 KiB
TOML
[package]
|
|
name = "extensions_ui"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
publish = false
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
path = "src/extensions_ui.rs"
|
|
|
|
[features]
|
|
test-support = []
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
assistant_slash_command.workspace = true
|
|
async-trait.workspace = true
|
|
client.workspace = true
|
|
collections.workspace = true
|
|
context_servers.workspace = true
|
|
db.workspace = true
|
|
editor.workspace = true
|
|
extension_host.workspace = true
|
|
fs.workspace = true
|
|
futures.workspace = true
|
|
fuzzy.workspace = true
|
|
gpui.workspace = true
|
|
indexed_docs.workspace = true
|
|
language.workspace = true
|
|
num-format.workspace = true
|
|
picker.workspace = true
|
|
project.workspace = true
|
|
release_channel.workspace = true
|
|
semantic_version.workspace = true
|
|
serde.workspace = true
|
|
settings.workspace = true
|
|
smallvec.workspace = true
|
|
snippet_provider.workspace = true
|
|
theme.workspace = true
|
|
theme_selector.workspace = true
|
|
ui.workspace = true
|
|
util.workspace = true
|
|
vim.workspace = true
|
|
wasmtime-wasi.workspace = true
|
|
workspace.workspace = true
|
|
|
|
[dev-dependencies]
|
|
async-compression.workspace = true
|
|
async-tar.workspace = true
|
|
ctor.workspace = true
|
|
editor = { workspace = true, features = ["test-support"] }
|
|
env_logger.workspace = true
|
|
extension_host = {workspace = true, features = ["test-support"] }
|
|
fs = { workspace = true, features = ["test-support"] }
|
|
gpui = { workspace = true, features = ["test-support"] }
|
|
http_client.workspace = true
|
|
indexed_docs.workspace = true
|
|
language = { workspace = true, features = ["test-support"] }
|
|
lsp.workspace = true
|
|
node_runtime.workspace = true
|
|
parking_lot.workspace = true
|
|
project = { workspace = true, features = ["test-support"] }
|
|
reqwest_client.workspace = true
|
|
serde_json.workspace = true
|
|
workspace = { workspace = true, features = ["test-support"] }
|