Provide wasm extensions with APIs needed for using pre-installed LSP binaries (#9085)

In this PR, we've added two new methods that LSP extensions can call:
* `shell_env()`, for retrieving the environment variables set in the
user's default shell in the worktree
* `which(command)`, for looking up paths to an executable (accounting
for the user's shell env in the worktree)

To test this out, we moved the `uiua` language support into an
extension. We went ahead and removed the built-in support, since this
language is extremely obscure. Sorry @mikayla-maki. To continue coding
in Uiua in Zed, for now you can `Add Dev Extension` from the extensions
pane, and select the `extensions/uiua` directory in the Zed repo. Very
soon, we'll support publishing these extensions so that you'll be able
to just install it normally.

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
Max Brunsfeld 2024-03-08 14:18:06 -08:00 committed by GitHub
parent 5abcc1c3c5
commit 8a6264d933
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 235 additions and 256 deletions

View file

@ -39,7 +39,6 @@ mod tailwind;
mod terraform;
mod toml;
mod typescript;
mod uiua;
mod vue;
mod yaml;
mod zig;
@ -114,7 +113,6 @@ pub fn init(
("toml", tree_sitter_toml::language()),
("tsx", tree_sitter_typescript::language_tsx()),
("typescript", tree_sitter_typescript::language_typescript()),
("uiua", tree_sitter_uiua::language()),
("vue", tree_sitter_vue::language()),
("yaml", tree_sitter_yaml::language()),
("zig", tree_sitter_zig::language()),
@ -344,7 +342,6 @@ pub fn init(
"vue",
vec![Arc::new(vue::VueLspAdapter::new(node_runtime.clone()))]
);
language!("uiua", vec![Arc::new(uiua::UiuaLanguageServer {})]);
language!("proto");
language!("terraform", vec![Arc::new(terraform::TerraformLspAdapter)]);
language!(