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

Update QML extension to 0.0.2 #1560

Merged
merged 1 commit into from
Oct 21, 2024
Merged

Update QML extension to 0.0.2 #1560

merged 1 commit into from
Oct 21, 2024

Conversation

lkroll
Copy link
Contributor

@lkroll lkroll commented Oct 19, 2024

This update includes LSP support utilizing qmlls. Thanks to @flukejones!

@cla-bot cla-bot bot added the cla-signed label Oct 19, 2024
@notpeter notpeter merged commit 3cb31a3 into zed-industries:main Oct 21, 2024
3 checks passed
@notpeter
Copy link
Member

A possible future improvement, instead of using the hardcoded path of /usr/bin/:
https://github.com/lkroll/zed-qml/blob/1ecf7059ca926dd25b604aa62fe99fe0d59c7ec2/src/qmljs.rs#L25

You can use worktree.which to check for the binary in the users PATH
https://github.com/zed-extensions/java/blob/main/src/lib.rs#L29-L36

Thanks!

@lkroll
Copy link
Contributor Author

lkroll commented Oct 21, 2024

I just installed the extension on another machine and I think there is something wrong when checking for qmlls, as the extension is now trying to run qmlls6 even though qmlls is there. Still new to this.

failed to spawn command. path: "/usr/bin/qmlls6"

Will probably debug a bit further and push an update including your "fix" as well.

@notpeter
Copy link
Member

Yes. As a workaround you should be able to symlink your qmlls to /usr/bin/qmlls6 and get it working.

maxdeviant pushed a commit that referenced this pull request Oct 24, 2024
This update fixes qmlls path detection mentioned here:
#1560 (comment)

It is now using worktree.which to get the full path to either qmlls or
qmlls6 if it can be found in $PATH.

The error message when qmlls was not found is now clearer as well,
including some docs on how to install it on various distros and MacOS.
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.

2 participants