-
Notifications
You must be signed in to change notification settings - Fork 122
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
A Tree-sitter parser for syntax highlighting of Tact language on github.com, and in many editors and IDEs #302
Comments
@delovoyhomie, @SwiftAdviser if it's approved, please assign me to it, as I've made some progress on it already when doing Footstep 288 |
Also:
And:
So guys and gals, I need as much .tact files in your repos as possible :) UPD: By making this search query, github.com tells that there's about 750+ files with .tact extension at the moment. So my point still stands — we need more .tact files! In fact, the required goal is 2k files with reasonable distribution across unique I think it's a good idea to ask people who did TON Smart Contract Contests to also include Tact examples in all of their public repositories, that way we'll get a lot more .tact files across GitHub fast |
@delovoyhomie Moved the oriental release date from 20.09.23 to "One month (or less) from approval and assignment". I hope that is ok |
LGTM! Exactly what @Hiyorimi dreams of |
Btw, will this task add Tact language to the Markdown files too or not? Like """tact get fun greeting(): String { } How is it possible to do? |
Yes! That's the beauty — this would enable highlighting throughout the GitHub once they accept the new grammar ;) I already have some progress on it, ready to get assigned :) |
Very nice. Let's do this |
@novusnota approved |
@SwiftAdviser great! I'm very close to finishing #320 (it had its own challenges 😅), but once completed I'll switch to this project ASAP! |
Looking forward to see this implemented! A heads up: we are going to introduce more language constructs, like |
@anton-trunov will do! Tacts' ohm grammar file is very convenient to use as a single source-of-truth for the language reference for anyone who builds any Tact-related tooling out there :) |
@delovoyhomie Submitted a Questbook proposal for this task. Submission deadline is set to 10th of November, 2023. Continuing working to deliver great results on time 🚀 |
Progress report: Almost done. Technically, it's working rather well already, so the deadline (November 10th) is met, but I'll be adding more tests, improving docs, uploading it to a public repository and sending a PR to Linguist tomorrow-ish! UPD: Probably will take another day or two, but this won't affect #352 :) |
Amazing! Looking forward to trying it out |
With LSP integrated, we'll experience improved DX. Enjoy features like intelligent auto-completion, real-time diagnostics, and jump-to-definition, enhancing your overall coding experience |
@novusnota Perhaps you could share your repo with the tree-sitter grammar so we could start the preliminary review process? If it's not something you'd like to do, could you then provide some timeline for us to plan our work ahead? |
@anton-trunov Terribly sorry for the delay, been very sick last two weeks, now almost fully recovered. I'm done with the grammar and it's testing, and will try to do all the necessary sharing, PRs and related things before the end of Wednesday (29.11). That also includes #352. Thank you for the patience. I'll deliver good results, as always :) UPD: May take two more days to do it (i.e. until 01.12), just to be on the safe side with recovery process |
Sure, sure, no rush is needed. I wish you a speedy recovery |
@anton-trunov @delovoyhomie Thank you for letting me take extended time off. I'm finally done with my recovery and feeling great! Now, I'll swiftly go over the results of my past work in the next 1-2 days, and I'll make sure to do all the necessary publications and PRs to denote the completion of this and #352'nd bounties. Will stay in touch from now on ✌ |
Brushing up and going over all the kinds of optimizations and tests now, expect completeness real soon! ![]() By the way, once I upload the repository to public, should I then move it over to |
@novusnota Sorry, I missed your comment. Yep, moving new projects to Any updates on the project you can share? |
Great stuff! Hoping to see the final result soon. Btw, in the meantime, can you provide your TON wallet address for this SBT https://society.ton.org/contribute-to-tact-compiler? All your great contributions certainly qualify for this |
Yay! @novusnota has made awesome progress, see here: https://github.com/tact-lang/tree-sitter-tact. I think after the completion of the README.md's section on editor integration and other usages and an even unmerged PR to Linguist, this bounty can be fully paid as we cannot realistically expect thousands of Tact files across hundreds of projects to appear overnight. |
Btw, I tried |
It's finally done :) Deliverables:
About the PR: About the Github integration: That is, Tree-sitter supersedes TextMate, but in order to do that, one needs to:
Thankfully, we have a nice VSCode extension for Tact, which features the TextMate grammar, so I've pointed to it in the PR. Many thanks to @logvik for making and maintaining the extension! That's it for step 1, and for now we've all got to write more Tact to get it included to Linguist (and Github) in the first place :) I'll continue maintaining tact-lang/tree-sitter-tact in the meantime, just as I do with tact-lang/tact.vim and prism.js's grammar. P.S.: @anton-trunov As a bonus I quickly made a TextMate grammar for Ohm and submitted it to Linguist as well, so that in the near future the
|
@novusnota Fantastic work! I tried it with Helix and I needed to do some extra stuff that was not in the instructions: opened an issue here tact-lang/tree-sitter-tact#1. But that is some minor thing we can fix later, so I consider this project finished. Looking forward to seeing the Ohm support on GitHub as well :) |
@anton-trunov I've extended Helix instructions, thank you for your fantastic support! Linguist folks make a release approximately every 3-4 months (to match with Github Enterprise Server updates), and their last one was in December, so it's rather safe to say that the next release in ~March will feature Ohm support. And, if we're lucky with 800 more |
Rewards sent!Thank you for the contribution! |
Summary
The Tact programming language lacks proper syntax highlighting and other quality of life developer tools in many editors and IDEs besides VS Code and IntelliJ-based. Additionally, there's no syntax highlighting for it on the github.com itself.
To address those issues, this proposal suggests developing a Tree-sitter parser for the Tact programming language and contributing it to the GitHub's language detection tool, Linguist
Context
Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited.
Tree-sitter has built-in support for syntax highlighting, via the tree-sitter-highlight library, which is currently used on github.com for highlighting code written in several languages.
And besides it's use on github.com, Tree-sitter is often used in many editors and IDEs, including, but not limited to: NeoVim, Emacs, Helix, Zed, and many others. Although VS Code is currently not on that list, one of the core members of VS Code team has recently assigned himself to this issue of using Tree-sitter in VS Code with no oriental release date just yet.
Having a robust implementation of a Tree-sitter would greatly benefit the overall growth and adoption of the Tact programming language, and as a result, TON Blockchain as a whole.
Goals
Deliverables
Definition of Done
Reward
Total: $3000
Oriental Release Date
One month (or less) from approval and assignment.
The text was updated successfully, but these errors were encountered: