Skip to content

Commit 169b301

Browse files
committed
feat: snippets
1 parent ebdfb09 commit 169b301

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"onLanguage:func"
1212
],
1313
"categories": [
14-
"Programming Languages"
14+
"Programming Languages",
15+
"Snippets"
1516
],
1617
"repository": {
1718
"type": "git",
@@ -53,6 +54,12 @@
5354
"scopeName": "source.func",
5455
"path": "./syntaxes/.tmLanguage.json"
5556
}
57+
],
58+
"snippets": [
59+
{
60+
"language": "func",
61+
"path": "./snippets/snippets.json"
62+
}
5663
]
5764
},
5865
"devDependencies": {

snippets/snippets.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"Recieve internal message": {
3+
"prefix": ["recv_internal", "main"],
4+
"body": ["() recv_internal(int my_balance, int msg_value, cell in_msg_full, slice in_msg_body) impure {", "\t$0", "}"],
5+
"description": "A template for receiving internal message."
6+
},
7+
"Recieve external message": {
8+
"prefix": ["recv_external"],
9+
"body": ["() recv_external(slice in_msg) impure {", "\t$0", "}"],
10+
"description": "A template for receiving external message."
11+
},
12+
"Supported interfaces": {
13+
"prefix": ["supported_interfaces"],
14+
"body": ["_ supported_interfaces() method_id {", "\t;; see https://github.com/ton-foundation/specs/blob/main/specs/wtf-0001.md", "\treturn (123515602279859691144772641439386770278);", "}"],
15+
"description": "A template for WTF-01 compatible introspection. (ref: https://github.com/ton-foundation/specs/blob/main/specs/wtf-0001.md)"
16+
}
17+
}

0 commit comments

Comments
 (0)