Files
oak-gpui/crates
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
..
2024-11-01 13:20:30 -04:00
2024-10-27 19:44:21 -07:00
2024-10-24 12:14:03 -06:00
2024-11-06 20:36:59 -07:00
2024-08-13 23:06:07 -07:00
2024-11-06 10:06:25 -07:00
2024-11-06 10:06:25 -07:00
2024-10-26 03:32:22 +03:00
2024-11-01 13:28:34 -06:00
2024-07-15 17:04:15 -06:00
2024-11-06 10:06:25 -07:00
2024-11-06 10:06:25 -07:00
2024-10-02 13:27:16 +02:00
2024-11-07 15:22:53 -05:00
2024-11-06 20:36:59 -07:00
2024-10-30 11:26:54 -06:00