-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
edge.sublime-completions
93 lines (93 loc) · 2.61 KB
/
edge.sublime-completions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
"scope": "text.html.edge -source.js",
"completions": [
{
"trigger": "if\tEdge conditional",
"contents": "if($1)\n\t${2}\n@end"
},
{
"trigger": "elseif\tEdge conditional elseif block",
"contents": "elseif($1)\n\t${2}"
},
{
"trigger": "else\tEdge conditional else block",
"contents": "else\n\t${2}"
},
{
"trigger": "if-else\tEdge conditional with an else statement",
"contents": "if($1)\n\t${2}\n@else\n\t${3}\n@end"
},
{
"trigger": "unless\tEdge inverse conditional",
"contents": "unless($1)\n\t${2}\n@end"
},
{
"trigger": "unless-else\tEdge inverse conditional with an else statement",
"contents": "unless($1)\n\t${2}\n@else\n\t${3}\n@end"
},
{
"trigger": "each\tFor each loop",
"contents": "each(${1:item} in ${2:collection})\n\t${3}\n@end"
},
{
"trigger": "each-index\tFor each loop with index",
"contents": "each((${1:value}, ${2:key}) in ${3:collection})\n\t${4}\n@end"
},
{
"trigger": "component\tComponent with body",
"contents": "component(${1:'$2'})\n\t${3}\n@end"
},
{
"trigger": "!component\tInline component",
"contents": "!component(${1:'$2'})"
},
{
"trigger": "slot\tComponent slot",
"contents": "slot('$1')\n\t${2}\n@end"
},
{
"trigger": "inject\tInject state to the component tree",
"contents": "inject(${1:values})"
},
{
"trigger": "eval\tEvaluate an expression",
"contents": "eval(${1:expression})"
},
{
"trigger": "newError\tThrow an error with stack trace pointing to Edge template",
"contents": "newError('${1:message}', \\$caller.filename, \\$caller.line, \\$caller.col)"
},
{
"trigger": "include\tEdge partial",
"contents": "include(${1:'$2'})"
},
{
"trigger": "svg\tRender an SVG icon",
"contents": "svg(${1:'$2'})"
},
{
"trigger": "include-if\tEdge conditional partial",
"contents": "includeIf(${1:condition}, ${2:'$3'})"
},
{
"trigger": "debugger\tDebugger breakpoint",
"contents": "debugger"
},
{
"trigger": "let\tDefine a local variable",
"contents": "let(${1:variableName} = ${2:value})"
},
{
"trigger": "vite\tReference vite entrypoint file",
"contents": "vite('${1:resources/js/app.js}')"
},
{
"trigger": "can\tBouncer can guard",
"contents": "can('${1:Policy.action}'${2:, ${3:args}})"
},
{
"trigger": "cannot\tBouncer cannot guard",
"contents": "cannot('${1:Policy.action}'${2:, ${3:args}})"
},
]
}