ZIm/crates/extensions_ui/src
Marshall Bowers f92e6e9a95
Add support for context server extensions (#20250)
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
2024-11-08 16:39:21 -05:00
..
components extensions_ui: Add telemetry for docs click-throughs from feature upsells (#14583) 2024-07-16 12:59:51 -04:00
components.rs Upsell built-in features on the extensions page (#14516) 2024-07-15 17:10:01 -04:00
extension_context_server.rs Add support for context server extensions (#20250) 2024-11-08 16:39:21 -05:00
extension_indexed_docs_provider.rs Extension refactor (#20305) 2024-11-06 10:06:25 -07:00
extension_registration_hooks.rs Add support for context server extensions (#20250) 2024-11-08 16:39:21 -05:00
extension_slash_command.rs Extension refactor (#20305) 2024-11-06 10:06:25 -07:00
extension_store_test.rs Add support for context server extensions (#20250) 2024-11-08 16:39:21 -05:00
extension_suggest.rs Add suggestion for CMake files (#20292) 2024-11-06 14:51:26 +01:00
extension_version_selector.rs Rename extension crate to extension_host (#20081) 2024-11-01 12:53:02 -04:00
extensions_ui.rs Add support for context server extensions (#20250) 2024-11-08 16:39:21 -05:00