|
1 | 1 | {
|
2 | 2 | "require": {
|
3 | 3 | "prefix": "req",
|
4 |
| - "body": ["require(\"${1:module}\")"], |
| 4 | + "body": ["require(${1:module})"], |
5 | 5 | "description": "Require module"
|
6 | 6 | },
|
7 | 7 | "return": {
|
|
12 | 12 | "assigment": {
|
13 | 13 | "prefix": "ll",
|
14 | 14 | "body": ["local ${1:varName} = ${0:value}"],
|
15 |
| - "description": "create a variable" |
| 15 | + "description": "define a variable" |
16 | 16 | },
|
17 | 17 | "local": {
|
18 | 18 | "prefix": "l",
|
19 | 19 | "body": ["local ${0}"],
|
20 |
| - "description": "create a variable" |
| 20 | + "description": "declare a variable" |
21 | 21 | },
|
22 | 22 | "locreq": {
|
23 | 23 | "prefix": "lreq",
|
24 |
| - "body": ["local ${1:var} = require(\"${2:module}\")"], |
| 24 | + "body": ["local ${1:var} = require(${2:module})"], |
25 | 25 | "description": "Require module as a variable"
|
26 | 26 | },
|
27 | 27 | "class": {
|
28 | 28 | "prefix": "cl",
|
29 | 29 | "body": [
|
30 |
| - "${1:className} = {}\n", |
| 30 | + "${1:M} = {}\n", |
31 | 31 | "$1.${2:new} = function($3)",
|
32 |
| - "\tlocal ${4:varName} = ${5:value}\n", |
33 |
| - "\t${6: --code}\n", |
34 |
| - "\treturn $4", |
| 32 | + "\t${6}", |
35 | 33 | "end"
|
36 | 34 | ],
|
37 | 35 | "description": "Create a class"
|
|
56 | 54 | "forline": {
|
57 | 55 | "prefix": "forline",
|
58 | 56 | "body": [
|
59 |
| - "f = io.open(${1:\"${2:filename}\"}, \"${3:r}\")\n", |
| 57 | + "local f = io.open(${1:${2:filename}}, \"${3:r}\")\n", |
60 | 58 | "while true do",
|
61 | 59 | "\tline = f:read()",
|
62 | 60 | "\tif line == nil then break end\n",
|
63 |
| - "\t${0:-- code}", |
| 61 | + "\t${0}", |
64 | 62 | "end"
|
65 | 63 | ],
|
66 | 64 | "description": "read file line by line"
|
67 | 65 | },
|
68 | 66 | "function": {
|
69 | 67 | "prefix": "fu",
|
70 |
| - "body": ["function ${1:name}($2)", "\t${0:-- code}", "end"] |
| 68 | + "body": ["function ${1:name}($2)", "\t${0}", "end"] |
71 | 69 | },
|
72 | 70 | "inline-function": {
|
73 | 71 | "prefix": "f=",
|
74 |
| - "body": ["local ${1:name} = function($2)", "\t${0:-- code}", "end"] |
| 72 | + "body": ["local ${1:name} = function($2)", "\t${0}", "end"] |
75 | 73 | },
|
76 | 74 | "print": {
|
77 | 75 | "prefix": "p",
|
|
0 commit comments