extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Add move lang support extension

Open Tzal3x opened this issue 1 year ago • 10 comments

Related to https://github.com/zed-industries/extensions/issues/717

Tzal3x avatar May 15 '24 08:05 Tzal3x

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[bot] avatar May 15 '24 08:05 cla-bot[bot]

@cla-bot check

Tzal3x avatar May 15 '24 08:05 Tzal3x

The cla-bot has been summoned, and re-checked this pull request!

cla-bot[bot] avatar May 15 '24 08:05 cla-bot[bot]

This PR is a draft because I am facing the following issues:

  1. 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
  2. Not able to define properly the languages/move/outline.scm file based on the move tree-sitter.

Tzal3x avatar May 15 '24 08:05 Tzal3x

  1. 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?

mrnugget avatar May 15 '24 11:05 mrnugget

  1. 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?

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

Tzal3x avatar May 15 '24 12:05 Tzal3x

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?

mrnugget avatar May 15 '24 12:05 mrnugget

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?

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

Tzal3x avatar May 15 '24 13:05 Tzal3x

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.

mrnugget avatar May 15 '24 13:05 mrnugget

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. image

Tzal3x avatar May 17 '24 12:05 Tzal3x

Closing this out due to age.

If you come back to this, feel free to re-open this PR.

maxdeviant avatar Jul 01 '24 13:07 maxdeviant