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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user