This PR upgrades the Uiua extension to use v0.0.6 of the `zed_extension_api`. Release Notes: - N/A
28 lines
639 B
Rust
28 lines
639 B
Rust
use zed_extension_api::{self as zed, Result};
|
|
|
|
struct UiuaExtension;
|
|
|
|
impl zed::Extension for UiuaExtension {
|
|
fn new() -> Self {
|
|
Self
|
|
}
|
|
|
|
fn language_server_command(
|
|
&mut self,
|
|
_language_server_id: &zed::LanguageServerId,
|
|
worktree: &zed::Worktree,
|
|
) -> Result<zed::Command> {
|
|
let path = worktree
|
|
.which("uiua")
|
|
.ok_or_else(|| "uiua is not installed".to_string())?;
|
|
|
|
Ok(zed::Command {
|
|
command: path,
|
|
args: vec!["lsp".to_string()],
|
|
env: Default::default(),
|
|
})
|
|
}
|
|
}
|
|
|
|
zed::register_extension!(UiuaExtension);
|