zed_extension_api: Add default implementation for language_server_command (#13234)

This PR adds a default implementation for the `language_server_command`
method on the `Extension` trait.

This will allow for extensions to be defined without having to implement
this method, which will be useful for extensions that may just want to
provide slash commands.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-06-18 16:55:33 -04:00 committed by GitHub
parent 5ff7c893be
commit 5cbb360952
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,9 +66,11 @@ pub trait Extension: Send + Sync {
/// language.
fn language_server_command(
&mut self,
language_server_id: &LanguageServerId,
worktree: &Worktree,
) -> Result<Command>;
_language_server_id: &LanguageServerId,
_worktree: &Worktree,
) -> Result<Command> {
Err("`language_server_command` not implemented".to_string())
}
/// Returns the initialization options to pass to the specified language server.
fn language_server_initialization_options(