You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🚀 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).
8
8
9
9
⚡ Tact is a new programming language for TON blockchain that is focused on efficiency and simplicity. It is designed to be easy to learn and use, and to be a good fit for smart contracts, because it is a statically typed language with a simple syntax and a powerful type system.
10
10
11
11
## Features
12
12
13
-
TL;DR? [Jump straight to the installation](#installation)!
14
-
15
-
### Syntax highlighting
13
+
TL;DR? Jump straight to the [installation](#installation)!
<p>Color schemes on these screenshots: <i>One Light</i> | <i>One Dark</i></p>
23
21
</p>
24
-
-->
25
22
26
-
### Basic completions
23
+
This package features a comprehensive [TextMate grammar for Tact](package/Tact.tmLanguage.json), which is used for syntax highlighting here in Sublime Text as well as in Tact docs, Nujan IDE and other places. It's thoroughly tested [locally](tests/) and in [GitHub Actions CI](.github/workflows/ci.yml), and it also plays well with [Shiki syntax highlighter](https://github.com/shikijs/shiki).
27
24
28
-
<!--
29
-
[gif]
25
+
### ✍ Auto-completions and ⌨ Code snippets
30
26
31
-
Description.
27
+
<imgsrc=".github/media/feature-completions.png"alt="Feature: Auto-completions and Code snippets"/>
32
28
33
-
For more, you may try: ...
34
-
-->
29
+
Completions for:
35
30
36
-
### Code snippets
31
+
* Various constants, global static functions and Structs from the [core library](https://docs.tact-lang.org/ref). Note, that all of the static functions complete with their expected arguments!
32
+
* Literals, such as `true` or `null`
33
+
* Keywords, such as `return` or `while`
34
+
* Built-in types, such as `Bool` or `map<K, V>`
35
+
* Serialization types, like `uint8` or `coins`
36
+
* ...and more!
37
37
38
-
<!--
39
-
[gif]
38
+
Nearly all of the completions have descriptive annotations and/or clickable links to corresponding explanatory pages in documentation. Just press on the "Tact Docs" link at the bottom of the completions window, and it will take you straight to the docs!
40
39
41
-
Description.
42
-
-->
40
+
Apart from completions, this package also provides a bunch of larger code snippets:
43
41
44
-
### Syntax checks
42
+
1. Control flow related, like snippets for nested if-else-if or try-catch statements
43
+
2. Import related, like `impdeploy`, which expands to the full import statement for `@stdlib/deploy`
44
+
3. Various function declaration helpers, like `natfunction` for native functions or `init2` for initialization functions with two parameters
45
+
4. Constant and variable declaration helpers, named `constant` and `variable` respectively
46
+
5. A special `sendparams` snippet, which expands to `send(SendParameters{…})` with some values filled in for your convenience!
47
+
6. ...and more!
45
48
46
-
<!--
47
-
[gif]
49
+
**Note**, that these completions and snippets aren't semantic, in the sense that they're not aware of code contexts (being inside of a function body or declaring a Struct, for example). To enable semantic completions, see the [language server setup](#lsp-integration).
Mostly accurate indentation support. Note, that this package doesn't come with a fully-fledged formatter, but it tries its utmost to deliver a pleasant editing experience nonetheless.
Use <kbd>Ctrl/Cmd</kbd>+<kbd>/</kbd> for a single-line comment toggle and <kbd>Ctrl/Cmd</kbd>+<kbd>Shift</kbd>+<kbd>/</kbd> for multi-line comment toggle.
83
85
84
86
## Installation
85
87
86
88
<!-- TODO: Add to https://github.com/wbond/package_control_channel
87
89
### Through Package Control (Recommended)
88
90
89
-
This package is available on [Package Control](https://packagecontrol.io/installation). To install:
91
+
This package is available on [Package Control](https://packagecontrol.io/installation). To install it:
90
92
91
93
1. Open the command palette (<kbd>Ctrl/Cmd</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>)
92
94
2. Select **Package Control: Install Package**
@@ -97,7 +99,7 @@ This package is available on [Package Control](https://packagecontrol.io/install
97
99
98
100
1. Open the command palette (<kbd>Ctrl/Cmd</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>)
99
101
2. Select **Preferences: Browse Packages**, this should open the "Packages" directory in your file explorer
100
-
3. Clone this repo into that directory.
102
+
3. Clone this repo into that directory
101
103
102
104
Don't forget to run git pull from time to time to get the latest updates of this package.
103
105
@@ -119,7 +121,7 @@ To set it up, install the package and open its settings (**Preferences: LSP Sett
119
121
}
120
122
```
121
123
122
-
Additionally, you can disable all snippets and suggestions provided by this plugin and leave everything to LSP. To do so, set `"inhibit_snippet_competions"` to `true` right after `"clients"` in the same settings (**Preferences: LSP Settings** in the command palette):
124
+
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):
0 commit comments