Skip to content

Conversation

CyanChanges
Copy link

This PR make the extension look for current version of installed zig, and try download a corresponding zls binary.

So users with dev version of zig, could download correct (dev) version of zls.

This comment was marked as resolved.

@CyanChanges

This comment was marked as resolved.

@CyanChanges CyanChanges marked this pull request as draft May 27, 2025 05:39
@CyanChanges CyanChanges marked this pull request as ready for review May 27, 2025 05:39
@CyanChanges

This comment was marked as resolved.

@CyanChanges

This comment was marked as resolved.

@notpeter

This comment was marked as resolved.

@CyanChanges CyanChanges requested a review from probably-neb June 14, 2025 11:56
@maxdeviant maxdeviant changed the title feat: use zls version according to zig version Use zls version according to Zig version Jun 30, 2025
Copy link

@probably-neb probably-neb left a comment

Choose a reason for hiding this comment

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

I tried to run the extension as a dev extension and ran into a couple issues that made it clear to me this was not done previously. I've fixed some of the issues, namely compile errors and whitelisting the zig version command, however, I don't have time right now to get everything working.

I would appreciate if you would try to use your branch as a dev extension for Zig, and take a crack at the remaining issues. It currently seems to not detect version mismatches between zig and zls whatsoever. My setup was trying to use mise to set different versions of zig on my path when launching Zed in a zig project, and make sure the correct version of zls was found, however, it never used anything besides zls version 0.14 which I have installed globally

@probably-neb probably-neb self-assigned this Jun 30, 2025
@CyanChanges
Copy link
Author

I tried to run the extension as a dev extension and ran into a couple issues that made it clear to me this was not done previously. I've fixed some of the issues, namely compile errors and whitelisting the zig version command, however, I don't have time right now to get everything working.

I would appreciate if you would try to use your branch as a dev extension for Zig, and take a crack at the remaining issues. It currently seems to not detect version mismatches between zig and zls whatsoever. My setup was trying to use mise to set different versions of zig on my path when launching Zed in a zig project, and make sure the correct version of zls was found, however, it never used anything besides zls version 0.14 which I have installed globally

I tried it and it seems to be working, but I have no idea where's the log and where the error messages going. I didn't found any related documents about debugging extensions. Anyways I would like to work on these problems next week.

@probably-neb
Copy link

Yep, we don't have any documentation for debugging extensions as far as I'm aware. My process is usually rotating between rebuilding the dev extension in the zed: extensions tab, restarting language servers with editor: restart language server (while in a Zig file!) and then viewing the zls info in the dev: open language server logs tab by clicking on "rust-analyzer" (in image below) and selecting zls if it isn't already selected, then going through the dropdown that appears when you click "Server logs" to view RPC messages, and initialization params in "Server info"

Screenshot 2025-07-01 at 1 56 50 PM

@ddowbnac

This comment was marked as resolved.

@probably-neb
Copy link

Hey @CyanChanges, are you still working on this?

@probably-neb probably-neb marked this pull request as draft August 25, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants