Skip to content

Commit c7c5aeb

Browse files
authored
feat: support 1.6.3 (#39)
* feat: add snippets `deployparams` and `msgparams` * chore: refer to tact-language-server * feat: add `forceBasechain()` completion
1 parent d4a44d0 commit c7c5aeb

6 files changed

+38
-29
lines changed

README.md

+12-27
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
# tact-sublime
22

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

77
🚀 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).
88

9-
⚡ 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.
9+
⚡ 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.
10+
11+
[![Website](https://img.shields.io/badge/Website-blue?style=flat)](https://tact-lang.org)
12+
[![Documentation](https://img.shields.io/badge/Documentation-blue?style=flat)](https://docs.tact-lang.org)
13+
[![Twitter](https://img.shields.io/badge/X%2FTwitter-white?logo=x&style=flat&logoColor=gray)](https://x.com/tact_language)
14+
[![Telegram](https://img.shields.io/badge/Community_Chat-white?logo=telegram&style=flat)](https://t.me/tactlang)
15+
[![Telegram](https://img.shields.io/badge/Tact_Kitchen_🥣-white?logo=telegram&style=flat)](https://t.me/tact_kitchen)
1016

1117
## Features
1218

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

106112
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.
107113

108-
To set it up, install the package and open its settings (**Preferences: LSP Settings** in the command palette), then add this config:
109-
110-
```json
111-
{
112-
"clients": {
113-
"Tact": {
114-
"enabled": true,
115-
"command": ["tact-extracted-ls", "--stdio"],
116-
"selector": "source.tact"
117-
}
118-
}
119-
}
120-
```
121-
122-
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):
123-
124-
```json
125-
{
126-
"clients": { /*...*/ },
127-
"inhibit_snippet_completions": true
128-
}
129-
```
114+
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).
130115

131-
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.
116+
For additional customization of the **LSP** package, see its [Customization page](https://lsp.sublimetext.io/customization/).
132117

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

135120
## Compatibility
136121

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<snippet>
2+
<content><![CDATA[deploy(DeployParameters{value: ${1:0}, init: ${2:initOf SomeContract()}});$0]]></content>
3+
<tabTrigger>deployparams</tabTrigger>
4+
<scope>source.tact</scope>
5+
<description>deploy(DeployParameters{…})</description>
6+
</snippet>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<snippet>
2+
<content><![CDATA[message(MessageParameters{to: ${1:sender()}, value: ${2:0}});$0]]></content>
3+
<tabTrigger>messageparams</tabTrigger>
4+
<scope>source.tact</scope>
5+
<description>message(MessageParameters{…})</description>
6+
</snippet>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<snippet>
2+
<content><![CDATA[message(MessageParameters{to: ${1:sender()}, value: ${2:0}});$0]]></content>
3+
<tabTrigger>msgparams</tabTrigger>
4+
<scope>source.tact</scope>
5+
<description>message(MessageParameters{…})</description>
6+
</snippet>
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<snippet>
2-
<content><![CDATA[send(SendParameters{to: ${1:sender()}, value: ${2:0}})$0]]></content>
2+
<content><![CDATA[send(SendParameters{to: ${1:sender()}, value: ${2:0}});$0]]></content>
33
<tabTrigger>sendparams</tabTrigger>
44
<scope>source.tact</scope>
55
<description>send(SendParameters{…})</description>
6-
</snippet>
6+
</snippet>

package/Tact.sublime-completions

+6
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,12 @@
957957
"kind": "function",
958958
"details": "<a href=\"https://docs.tact-lang.org/ref/core-advanced#getconfigparam\">Tact Docs</a>"
959959
},
960+
{
961+
"trigger": "forceBasechain\tthrow an exception if its not basechain",
962+
"contents": "forceBasechain(${1:address})",
963+
"kind": "function",
964+
"details": "<a href=\"https://docs.tact-lang.org/ref/core-advanced#forcebasechain\">Tact Docs</a>"
965+
},
960966
{
961967
"trigger": "acceptMessage\tbuy some gas for external message",
962968
"contents": "acceptMessage()",

0 commit comments

Comments
 (0)