Skip to content

feat: support 1.6.3 #39

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

Merged
merged 3 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 12 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# tact-sublime

<center>
<div align="center">
<img src=".github/media/banner.png" alt="Tact + Sublime Text"/>
</center>
</div>

🚀 Adds syntax highlighting, folding, code snippets, and miscellaneous support for the [Tact programming language](https://tact-lang.org/) to Sublime Text [3* and onward](#compatibility).

⚡ Tact is a new 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.
⚡ 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.

[![Website](https://img.shields.io/badge/Website-blue?style=flat)](https://tact-lang.org)
[![Documentation](https://img.shields.io/badge/Documentation-blue?style=flat)](https://docs.tact-lang.org)
[![Twitter](https://img.shields.io/badge/X%2FTwitter-white?logo=x&style=flat&logoColor=gray)](https://x.com/tact_language)
[![Telegram](https://img.shields.io/badge/Community_Chat-white?logo=telegram&style=flat)](https://t.me/tactlang)
[![Telegram](https://img.shields.io/badge/Tact_Kitchen_🥣-white?logo=telegram&style=flat)](https://t.me/tact_kitchen)

## Features

Expand Down Expand Up @@ -105,32 +111,11 @@ Don't forget to run git pull from time to time to get the latest updates of this

When the language server supports it, the [**LSP** package](https://packagecontrol.io/packages/LSP) enables improved autocomplete, go-to-definition, formatting, "hover docs," compiler errors and warnings, general diagnostics, and more.

To set it up, install the package and open its settings (**Preferences: LSP Settings** in the command palette), then add this config:

```json
{
"clients": {
"Tact": {
"enabled": true,
"command": ["tact-extracted-ls", "--stdio"],
"selector": "source.tact"
}
}
}
```

Additionally, you can disable all snippets and suggestions provided by this (and other) packages and leave everything to LSPs. To do so, set `"inhibit_snippet_competions"` to `true` right after `"clients"` in the same settings (**Preferences: LSP Settings** in the command palette):

```json
{
"clients": { /*...*/ },
"inhibit_snippet_completions": true
}
```
To install the base **LSP** package and set up the [official Tact language server](https://github.com/tact-lang/tact-language-server), refer to: [Editor Setup > Sublime Text](https://github.com/tact-lang/tact-language-server#sublime-text).

The configurations above assume you have installed the Tact language server extracted from the [tact-vscode](https://github.com/tact-lang/tact-vscode). If not, run `npm i—g tact-extracted-ls` to install it.
For additional customization of the **LSP** package, see its [Customization page](https://lsp.sublimetext.io/customization/).

To set up keyboard shortcuts for the language server, see [Key Bindings](https://lsp.sublimetext.io/customization/#keyboard-shortcuts-key-bindings).
For example, to set up keyboard shortcuts for the language server, see [Key Bindings](https://lsp.sublimetext.io/customization/#keyboard-shortcuts-key-bindings).

## Compatibility

Expand Down
6 changes: 6 additions & 0 deletions package/Snippets/deployparams.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[deploy(DeployParameters{value: ${1:0}, init: ${2:initOf SomeContract()}});$0]]></content>
<tabTrigger>deployparams</tabTrigger>
<scope>source.tact</scope>
<description>deploy(DeployParameters{…})</description>
</snippet>
6 changes: 6 additions & 0 deletions package/Snippets/messageparams.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[message(MessageParameters{to: ${1:sender()}, value: ${2:0}});$0]]></content>
<tabTrigger>messageparams</tabTrigger>
<scope>source.tact</scope>
<description>message(MessageParameters{…})</description>
</snippet>
6 changes: 6 additions & 0 deletions package/Snippets/msgparams.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[message(MessageParameters{to: ${1:sender()}, value: ${2:0}});$0]]></content>
<tabTrigger>msgparams</tabTrigger>
<scope>source.tact</scope>
<description>message(MessageParameters{…})</description>
</snippet>
4 changes: 2 additions & 2 deletions package/Snippets/sendparams.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<snippet>
<content><![CDATA[send(SendParameters{to: ${1:sender()}, value: ${2:0}})$0]]></content>
<content><![CDATA[send(SendParameters{to: ${1:sender()}, value: ${2:0}});$0]]></content>
<tabTrigger>sendparams</tabTrigger>
<scope>source.tact</scope>
<description>send(SendParameters{…})</description>
</snippet>
</snippet>
6 changes: 6 additions & 0 deletions package/Tact.sublime-completions
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,12 @@
"kind": "function",
"details": "<a href=\"https://docs.tact-lang.org/ref/core-advanced#getconfigparam\">Tact Docs</a>"
},
{
"trigger": "forceBasechain\tthrow an exception if its not basechain",
"contents": "forceBasechain(${1:address})",
"kind": "function",
"details": "<a href=\"https://docs.tact-lang.org/ref/core-advanced#forcebasechain\">Tact Docs</a>"
},
{
"trigger": "acceptMessage\tbuy some gas for external message",
"contents": "acceptMessage()",
Expand Down