zed-industries / extensions

Extensions for the Zed editor
915 stars 406 forks source link

Update QML extension to 0.0.2 #1560

Closed lkroll closed 3 weeks ago

lkroll commented 3 weeks ago

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

notpeter commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

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