Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: mvp zed extension going #75

Merged
merged 1 commit into from
Dec 18, 2024
Merged

feat: mvp zed extension going #75

merged 1 commit into from
Dec 18, 2024

Conversation

maraisr
Copy link
Contributor

@maraisr maraisr commented Dec 17, 2024

Get's a Zed Extension impl going. Where the LSP is downloaded from GitHub release assets.

Even though Zed extensions are Rust projects, we shouldn't include that as part of our hdx workspace. Furthermore, we should treat the lsp as external, and not try to compile our lsp directly within the extension wasm.

The lsp location is resolved through either;

  1. env: HDX_SERVER_PATH (which is the same as the VSCode one)
  2. we download it from GitHub's release assets

CleanShot 2024-12-17 at 18 00 26

&zed::LanguageServerInstallationStatus::Downloading,
);

zed::download_file(&asset.download_url, "bin", zed::DownloadedFileType::Zip)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we have the release assets going, this line may need to change a tad. As in is it bin/binary-platform-arch??

@maraisr maraisr marked this pull request as draft December 17, 2024 08:20
Copy link
Owner

@keithamus keithamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks amazing! Couple of small things:

packages/hdx_zed/dev.md Outdated Show resolved Hide resolved
packages/hdx_zed/extension.toml Outdated Show resolved Hide resolved
packages/hdx_zed/extension.toml Outdated Show resolved Hide resolved
packages/hdx_zed/src/lib.rs Outdated Show resolved Hide resolved
@maraisr maraisr marked this pull request as ready for review December 18, 2024 00:39
@@ -96,13 +96,14 @@ jobs:
BIN_NAME=hdx-${{ matrix.code-target }}
mv target/${{ matrix.target }}/release/hdx $BIN_NAME

- run: chmod +x hdx-*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed zed::make_file_executable in the extension, which we don't need to do; if we chmod +x the binary.

I believe these file modes are transfered through the assets; but wasnt too sure so kept the zed fn api to +x it.

@keithamus keithamus merged commit c7fab07 into keithamus:main Dec 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants