Tact
All-in-one package for Tact programming language
Details
Installs
- Total 28
- Win 9
- Mac 14
- Linux 5
Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
tact-sublime

🚀 Adds syntax highlighting, folding, code snippets, and miscellaneous support for the Tact programming language to Sublime Text 3* and onward.
⚡ Tact is a fresh programming language for TON blockchain focused on efficiency and simplicity. It is designed to be easy to learn and use and a good fit for smart contracts because it is a statically typed language with a simple syntax and a powerful type system.
Features
TL;DR? Jump straight to the installation!
✨ Syntax highlighting
Color schemes on these screenshots: One Light | One Dark
This package features a comprehensive TextMate grammar for Tact, which is used for syntax highlighting in Sublime Text, Tact docs, TON Web IDE, and other places. It's thoroughly tested locally and in GitHub Actions CI, and it also plays well with Shiki syntax highlighter.
✍ Auto-completions and ⌨ Code snippets
Completions for:
- Various constants, global static functions, and structs from the core library. Note that all of the static functions are complete with their expected arguments!
- Literals, such as
true
ornull
- Keywords, such as
return
orwhile
- Built-in types, such as
Bool
ormap<K, V>
- Serialization types, like
uint8
orcoins
- …and more!
Nearly all completions have descriptive annotations and/or clickable links to corresponding explanatory pages in the documentation. Press the “Tact Docs” link at the bottom of the completions window, and it will take you straight to the docs!
Apart from completions, this package also provides a bunch of larger code snippets:
- Control flow related, like snippets for nested if-else-if or try-catch statements.
- Import related, like
impdeploy
, which expands to the complete import statement for@stdlib/deploy
. - Various function declaration helpers, like
natfunction
for native functions orinit2
for initialization functions with two parameters - Constant and variable declaration helpers, named
constant
andvariable
respectively. - A special
sendparams
snippet expands tosend(SendParameters{…})
with some values filled in for your convenience! - and more!
Note that these completions and snippets are not semantic because they're unaware of code contexts (being inside a function body or declaring a Struct, for example). See the language server setup to enable semantic completions.
✔ Syntax checks
In any Tact project with node_modules
involved, you can:
- Open the command palette (Ctrl/Cmd+Shift+P)
- Select Build With: Tact,
which will run syntax and type checking on the currently edited .tact
file.
🗒 Symbol lists
Use Ctrl/Cmd+r for opening and searching symbol lists in the current file.
👉 Indentation
Mostly accurate indentation support. Although this package doesn't come with a fully-fledged formatter, it tries its utmost to deliver a pleasant editing experience nonetheless.
{...}
Folding
Freely collapse and expand chunks of your code in-between braces {}
or parentheses ()
.
💭 Comments
Use Ctrl/Cmd+/ for a single-line comment toggle and Ctrl/Cmd+Shift+/ for multi-line comment toggle.
Installation
Through Package Control (Recommended)
This package is available on Package Control. To install it:
- Open the command palette (Ctrl/Cmd+Shift+P)
- Select Package Control: Install Package
- Select Tact
Manual installation
- Open the command palette (Ctrl/Cmd+Shift+P)
- Select Preferences: Browse Packages. It should open the “Packages” directory in your file explorer
- Clone this repo into that directory
Don't forget to run git pull from time to time to get the latest updates of this package.
LSP integration
When the language server supports it, the LSP package enables improved autocomplete, go-to-definition, formatting, “hover docs,” compiler errors and warnings, general diagnostics, and more.
To install the base LSP package and set up the official Tact language server, refer to: Editor Setup > Sublime Text.
For additional customization of the LSP package, see its Customization page.
For example, to set up keyboard shortcuts for the language server, see Key Bindings.
Compatibility
This package's syntax highlighting capabilities target Sublime Text 3+. At the same time, the rest of the features try to target the latest Sublime Text 4+—bugs related to those features failing on any version lower than 4 will not be focused on.
Useful Tact links
- Official Website
- Tact Documentation
- Discussion Group in Telegram
- X/Twitter
Credits
Based on The Open Network.
Built with 🤍 by Novus Nota.
Contributing
When working on the grammar, do it in the JSON file. Then, convert it to Plist (XML) format using the following VSCode extension: tmLanguage.
Note that color schemes greatly affect how the grammar looks, and stick to commonly used capture names over trying to nail semantics with more specific ones.
License
MIT © Novus Nota.