Add move lang support extension
Related to https://github.com/zed-industries/extensions/issues/717
We require contributors to sign our Contributor License Agreement, and we don't have @Tzal3x on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.
@cla-bot check
The cla-bot has been summoned, and re-checked this pull request!
This PR is a draft because I am facing the following issues:
- Go to definition is not working:
[ERROR] crates/project/src/project.rs:3420: no worktree found for diagnostics path "/.../.move/https___github_com_MystenLabs_sui_git_framework__testnet/crates/sui-framework/packages/sui-framework/tests/math_tests.move - Not able to define properly the
languages/move/outline.scmfile based on the move tree-sitter.
- no worktree found for diagnostics path "/.../.move/https___github_com_MystenLabs_sui_git_framework__testnet/crates/sui-framework/packages/sui-framework/tests/math_tests.move
Does the /.../.move come from move itself? Because that's not a valid path. Does /.../ refer to the project root or something?
- no worktree found for diagnostics path "/.../.move/https___github_com_MystenLabs_sui_git_framework__testnet/crates/sui-framework/packages/sui-framework/tests/math_tests.move
Does the
/.../.movecome from move itself? Because that's not a valid path. Does/.../refer to the project root or something?
You are right! Sorry about that, it was /Users/alex/, but I replaced it accidentally.
Therefore the correct message would be: /Users/alex/.move/https___github_com_MystenLabs_sui_git_framework__testnet/crates/sui-framework/packages/sui-framework/tests/versioned_tests.move
Yeah, then the problem seems to be that it needs to access files outside of the project/worktree in Zed, it seems? Is that required or is it possible to have that .move directory inside the project?
Yeah, then the problem seems to be that it needs to access files outside of the project/worktree in Zed, it seems? Is that required or is it possible to have that
.movedirectory inside the project?
Copying the .move file to the project's workspace, doesn't solve the issue. Even if it did though, this dir should be linkable with the workspace somehow, because users shouldn't do this manually each time.
Pasting the message bellow for clarity:
2024-05-15T16:38:20+03:00 [ERROR] crates/project/src/project.rs:3420: no worktree found for diagnostics path "/Users/alex/.move/https___github_com_MystenLabs_sui_git_framework__testnet/crates/sui-framework/packages/sui-framework/tests/versioned_tests.move"
If you like to try this out, here is a project you can clone and try the extension on: https://github.com/Tzal3x/move-training
Even if it did though, this dir should be linkable with the workspace somehow, because users shouldn't do this manually each time.
Yeah, that's possible. You could drag it into the project. I just don't think extensions can do that.
My suggestion also wasn't that users manually copy this, but that the language server might be configurable to use a different directory.
Putting this as "ready for review" in case a reviewer can help on that worktree error.
If this is resolved, the PR can be merged.
Closing this out due to age.
If you come back to this, feel free to re-open this PR.