Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Support] Update a language grammar. #9569

Closed
7ombie opened this issue Feb 8, 2024 · 0 comments
Closed

[Support] Update a language grammar. #9569

7ombie opened this issue Feb 8, 2024 · 0 comments

Comments

@7ombie
Copy link
Contributor

7ombie commented Feb 8, 2024

In response to #2033, I mentioned a few issues with Swift support, and @Dispersia gave me some pointers on how to update the grammar and make a PR. I've made a start, but ran into a Helix-specific issue, and didn't want to keep asking @Dispersia for advice.

I cloned the Swift TreeSitter project and Helix, set HELIX_DEFAULT_RUNTIME to the runtime directory inside the Helix repo, then built Helix from source. That seemed to work fine.

I then edited .../runtime/queries/swift/highlights.scm within the Helix repo, making a few changes, based on the tree-sitter-swift version of highlights.scm. I also updated languages.toml to point to the newest commit hash for their project:

[[grammar]]
name = "swift"
source = { git = "https://github.com/alex-pinkus/tree-sitter-swift", rev = "1c586339fb00014b23d6933f2cc32b588a226f3b" }

When I tried to rebuild Helix (using cargo install --path helix-term --locked) it failed with this message:

  Failure 1/1: swift Failed to compare source and binary timestamps

  --- stderr
  thread 'main' panicked at 'Failed to compile tree-sitter grammars: 1 grammars failed to build', helix-term/build.rs:7:14

I don't know how to address this, and can't find any more information. I don't know Rust either, so am not familiar with Cargo etc. Any advice would be appreciated. Thanks.

@helix-editor helix-editor locked and limited conversation to collaborators Feb 8, 2024
@the-mikedavis the-mikedavis converted this issue into discussion #9570 Feb 8, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant