-
Notifications
You must be signed in to change notification settings - Fork 641
/
asciidoc.code-snippets
185 lines (185 loc) · 6.09 KB
/
asciidoc.code-snippets
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
{
// Place your snippets for AsciiDoc here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
// https://code.visualstudio.com/docs/editor/userdefinedsnippets
// https://www.freecodecamp.org/news/definitive-guide-to-snippets-visual-studio-code/
"adoc tablist": {
"prefix": "tablist",
"body": [
"====",
"[role=\"tablist\"]",
"${1:Fargate - [.noloc]`Linux`}::",
"+",
"[source,bash,subs=\"verbatim,attributes\"]",
"----",
"eksctl create cluster --name my-cluster --region region-code --fargate",
"----\n",
"${2:Managed nodes - [.noloc]`Linux`}::",
"+",
"[source,bash,subs=\"verbatim,attributes\"]",
"----",
"eksctl create cluster --name my-cluster --region region-code",
"----",
"eksctl create cluster --name my-cluster --region region-code",
"----\n",
"===="
],
"description": "adoc tablist"
},
"adoc step tablist": {
"prefix": "tab-step",
"body": [
"====",
"[role=\"tablist\"]",
"${1:{aws-management-console}`}::",
"+",
"[source,bash,subs=\"verbatim,attributes\"]",
"----",
"eksctl create cluster --name my-cluster --region region-code --fargate",
"----\n",
"${2:[.noloc]`eksctl`}::",
"+",
"[source,bash,subs=\"verbatim,attributes\"]",
"----",
"eksctl create cluster --name my-cluster --region region-code",
"----\n",
"${3:{aws} CLI}::",
"+",
"[source,bash,subs=\"verbatim,attributes\"]",
"----",
"eksctl create cluster --name my-cluster --region region-code",
"----\n",
"${3:{aws} CloudFormation}::",
"+",
"[source,bash,subs=\"verbatim,attributes\"]",
"----",
"eksctl create cluster --name my-cluster --region region-code",
"----\n",
"===="
],
"description": "adoc step tablist"
},
"adoc region tablist": {
"prefix": "tab-region",
"body": [
"====",
"[role=\"tablist\"]",
"${1:{aws}`}::",
"`eks-cluster.[.replaceable]``region``.api.aws`",
"\n",
"${2:{aws} GovCloud (US)}::",
"`eks-cluster.[.replaceable]``region``.api.aws`",
"\n",
"${3:{amazon-web-services} in China::",
"`eks-cluster.[.replaceable]``region``.api.amazonwebservices.com.cn`",
"\n",
"===="
],
"description": "adoc region tablist"
},
"Code Block": {
"prefix": "adoc-code",
"body": [
"[source,${1|yaml,cli,json,java,python,javascript,ruby,go,bash|}]",
"----",
"${2:// Your code here}",
"----",
"$0"
],
"description": "Code block with language selection"
},
"AWS AsciiDoc Link": {
"prefix": "adoc-link",
"body": [
"link:${1:path}[\"${2:link text}\",type=\"${3|documentation,marketing,console,blog,api|}\"]"
],
"description": "Create an AWS documentation link in AsciiDoc format"
},
"Admonition Block": {
"prefix": "adoc-admonition",
"body": [
"[${1|NOTE,TIP,IMPORTANT,CAUTION,WARNING|}]",
"====",
"${2:Admonition content}",
"====",
"$0"
],
"description": "Admonition block with type selection"
},
"Table": {
"prefix": "adoc-table",
"body": [
"[%header,cols=\"${1:1,1}\"]",
"|===",
"| ${2:Header 1} | ${3:Header 2}",
"",
"| ${4:Cell 1} | ${5:Cell 2}",
"|===",
"$0"
],
"description": "Basic table with headers"
},
"Cross Reference": {
"prefix": "adoc-xref",
"body": [
"<<${1:anchor-id},${2:display text}>>$0"
],
"description": "Cross-reference link"
},
"Definition List": {
"prefix": "adoc-deflist",
"body": [
"${1:Term 1}::",
"${2:Definition 1}",
"",
"${3:Term 2}::",
"${4:Definition 2}",
"$0"
],
"description": "Definition list"
},
"NODE_ROOT Section": {
"prefix": "adoc-topic",
"body": [
"//!!NODE_ROOT <section>",
"[.topic]",
"[[${1:page-id},${1:page-id}.title]]",
"= ${2:page title goes here}",
":info_doctype: section",
"",
"include::../attributes.txt[]",
"",
],
"description": "Creates a NODE_ROOT section template with topic class and ID"
},
"Include with Leveloffset": {
"prefix": "adoc-inc",
"body": [
"include::${1:filename}.adoc[leveloffset=+1]$0"
],
"description": "Creates an include statement with leveloffset=+1, automatically adding .adoc extension"
},
"AsciiDoc Collapsible Section": {
"prefix": "adoc-collapse",
"body": [
"[[${1:collapsible-section-id},${1:collapsible-section-id}.title]]",
".${2:Section Title}",
"[%collapsible, expand-section=\"_collapse_all_\"]",
"====",
"${3:This is where the text to collapse goes.}",
"===="
],
"description": "Creates a collapsible section in AsciiDoc"
}
}