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

Add language support for sway #6023

Merged
merged 5 commits into from
Feb 25, 2023
Merged

Conversation

sdankel
Copy link
Contributor

@sdankel sdankel commented Feb 16, 2023

Adds language support for the sway smart contract programming language using tree-sitter-sway.

@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. A-language-support Area: Support for programming/text languages labels Feb 17, 2023
@sdankel sdankel marked this pull request as draft February 17, 2023 04:45
@sdankel
Copy link
Contributor Author

sdankel commented Feb 17, 2023

I found a few bugs in the tree sitter implementation. Will move out of draft once those are fixed.

@kirawi
Copy link
Member

kirawi commented Feb 17, 2023

It looks like highlights.scm is a copy of the Rust version. You can replace it all with ; inherits: rust

@sdankel
Copy link
Contributor Author

sdankel commented Feb 21, 2023

It looks like highlights.scm is a copy of the Rust version. You can replace it all with ; inherits: rust

Good to know! It is heavily based on rust's syntax highlighting, but there are a few nuances for sway (keywords, etc).

I also have this file in the tree-sitter repo here: https://github.com/FuelLabs/tree-sitter-sway/blob/master/queries/highlights.scm

Is there a way to configure helix to use tree-sitter's queries directory by default, or do I need to include the same queries directory in helix?

languages.toml Outdated Show resolved Hide resolved
@sdankel sdankel marked this pull request as ready for review February 21, 2023 02:47
languages.toml Outdated Show resolved Hide resolved
Co-authored-by: Michael Davis <[email protected]>
@the-mikedavis the-mikedavis merged commit f69bb41 into helix-editor:master Feb 25, 2023
estin pushed a commit to estin/helix that referenced this pull request Mar 4, 2023
wes-adams pushed a commit to wes-adams/helix that referenced this pull request Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants