Files
zed/extensions/uiua/src/uiua.rs
Marshall Bowers fe23504eba uiua: Upgrade zed_extension_api to v0.0.6 (#15240)
This PR upgrades the Uiua extension to use v0.0.6 of the
`zed_extension_api`.

Release Notes:

- N/A
2024-07-25 20:43:15 -04:00

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);