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:
parent
5abcc1c3c5
commit
8a6264d933
23 changed files with 235 additions and 256 deletions
|
@ -1,15 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
WASI_ADAPTER_URL="https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.2/wasi_snapshot_preview1.reactor.wasm"
|
||||
WASI_SDK_URL="https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-21/wasi-sdk-21.0-macos.tar.gz"
|
||||
|
||||
echo "Downloading WASI adapter: $WASI_ADAPTER_URL"
|
||||
curl -L $WASI_ADAPTER_URL -o target/wasi_snapshot_preview1.reactor.wasm
|
||||
|
||||
echo "Downloading WASI SDK: $WASI_SDK_URL"
|
||||
mkdir -p target/wasi-sdk.archive
|
||||
curl -L $WASI_SDK_URL | tar -xz - -C target/wasi-sdk.archive
|
||||
rm -rf target/wasi-sdk/
|
||||
mv -f target/wasi-sdk.archive/wasi-sdk-21.0/ target/wasi-sdk
|
Loading…
Add table
Add a link
Reference in a new issue