1+ {
2+ // Place your snippets for AsciiDoc here. Each snippet is defined under a snippet name and has a prefix, body and
3+ // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
4+ // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
5+ // same ids are connected.
6+ // Example:
7+ // "Print to console": {
8+ // "prefix": "log",
9+ // "body": [
10+ // "console.log('$1');",
11+ // "$2"
12+ // ],
13+ // "description": "Log output to console"
14+ // }
15+ // https://code.visualstudio.com/docs/editor/userdefinedsnippets
16+ // https://www.freecodecamp.org/news/definitive-guide-to-snippets-visual-studio-code/
17+ "adoc tablist" : {
18+ "prefix" : " tablist" ,
19+ "body" : [
20+ " ====" ,
21+ " [role=\" tablist\" ]" ,
22+ " ${1:Fargate - [.noloc]`Linux`}::" ,
23+ " +" ,
24+ " [source,bash,subs=\" verbatim,attributes\" ]" ,
25+ " ----" ,
26+ " eksctl create cluster --name my-cluster --region region-code --fargate" ,
27+ " ----\n " ,
28+ " ${2:Managed nodes - [.noloc]`Linux`}::" ,
29+ " +" ,
30+ " [source,bash,subs=\" verbatim,attributes\" ]" ,
31+ " ----" ,
32+ " eksctl create cluster --name my-cluster --region region-code" ,
33+ " ----" ,
34+ " eksctl create cluster --name my-cluster --region region-code" ,
35+ " ----\n " ,
36+ " ===="
37+ ],
38+ "description" : " adoc tablist"
39+ },
40+ "adoc step tablist" : {
41+ "prefix" : " tab-step" ,
42+ "body" : [
43+ " ====" ,
44+ " [role=\" tablist\" ]" ,
45+ " ${1:{aws-management-console}`}::" ,
46+ " +" ,
47+ " [source,bash,subs=\" verbatim,attributes\" ]" ,
48+ " ----" ,
49+ " eksctl create cluster --name my-cluster --region region-code --fargate" ,
50+ " ----\n " ,
51+ " ${2:[.noloc]`eksctl`}::" ,
52+ " +" ,
53+ " [source,bash,subs=\" verbatim,attributes\" ]" ,
54+ " ----" ,
55+ " eksctl create cluster --name my-cluster --region region-code" ,
56+ " ----\n " ,
57+ " ${3:{aws} CLI}::" ,
58+ " +" ,
59+ " [source,bash,subs=\" verbatim,attributes\" ]" ,
60+ " ----" ,
61+ " eksctl create cluster --name my-cluster --region region-code" ,
62+ " ----\n " ,
63+ " ${3:{aws} CloudFormation}::" ,
64+ " +" ,
65+ " [source,bash,subs=\" verbatim,attributes\" ]" ,
66+ " ----" ,
67+ " eksctl create cluster --name my-cluster --region region-code" ,
68+ " ----\n " ,
69+ " ===="
70+ ],
71+ "description" : " adoc step tablist"
72+ },
73+ "adoc region tablist" : {
74+ "prefix" : " tab-region" ,
75+ "body" : [
76+ " ====" ,
77+ " [role=\" tablist\" ]" ,
78+ " ${1:{aws}`}::" ,
79+ " `eks-cluster.[.replaceable]``region``.api.aws`" ,
80+ " \n " ,
81+ " ${2:{aws} GovCloud (US)}::" ,
82+ " `eks-cluster.[.replaceable]``region``.api.aws`" ,
83+ " \n " ,
84+ " ${3:{amazon-web-services} in China::" ,
85+ " `eks-cluster.[.replaceable]``region``.api.amazonwebservices.com.cn`" ,
86+ " \n " ,
87+ " ===="
88+ ],
89+ "description" : " adoc region tablist"
90+ },
91+ "Code Block" : {
92+ "prefix" : " adoc-code" ,
93+ "body" : [
94+ " [source,${1|yaml,cli,json,java,python,javascript,ruby,go,bash|}]" ,
95+ " ----" ,
96+ " ${2:// Your code here}" ,
97+ " ----" ,
98+ " $0"
99+ ],
100+ "description" : " Code block with language selection"
101+ },
102+ "AWS AsciiDoc Link" : {
103+ "prefix" : " adoc-link" ,
104+ "body" : [
105+ " link:${1:path}[\" ${2:link text}\" ,type=\" ${3|documentation,marketing,console,blog,api|}\" ]"
106+ ],
107+ "description" : " Create an AWS documentation link in AsciiDoc format"
108+ },
109+ "Admonition Block" : {
110+ "prefix" : " adoc-admonition" ,
111+ "body" : [
112+ " [${1|NOTE,TIP,IMPORTANT,CAUTION,WARNING|}]" ,
113+ " ====" ,
114+ " ${2:Admonition content}" ,
115+ " ====" ,
116+ " $0"
117+ ],
118+ "description" : " Admonition block with type selection"
119+ },
120+ "Table" : {
121+ "prefix" : " adoc-table" ,
122+ "body" : [
123+ " [%header,cols=\" ${1:1,1}\" ]" ,
124+ " |===" ,
125+ " | ${2:Header 1} | ${3:Header 2}" ,
126+ " " ,
127+ " | ${4:Cell 1} | ${5:Cell 2}" ,
128+ " |===" ,
129+ " $0"
130+ ],
131+ "description" : " Basic table with headers"
132+ },
133+ "Cross Reference" : {
134+ "prefix" : " adoc-xref" ,
135+ "body" : [
136+ " <<${1:anchor-id},${2:display text}>>$0"
137+ ],
138+ "description" : " Cross-reference link"
139+ },
140+ "Definition List" : {
141+ "prefix" : " adoc-deflist" ,
142+ "body" : [
143+ " ${1:Term 1}::" ,
144+ " ${2:Definition 1}" ,
145+ " " ,
146+ " ${3:Term 2}::" ,
147+ " ${4:Definition 2}" ,
148+ " $0"
149+ ],
150+ "description" : " Definition list"
151+ },
152+ "NODE_ROOT Section" : {
153+ "prefix" : " adoc-topic" ,
154+ "body" : [
155+ " //!!NODE_ROOT <section>" ,
156+ " [.topic]" ,
157+ " [[${1:page-id},${1:page-id}.title]]" ,
158+ " = ${2:page title goes here}" ,
159+ " :info_doctype: section" ,
160+ " " ,
161+ " include::../attributes.txt[]" ,
162+ " " ,
163+ ],
164+ "description" : " Creates a NODE_ROOT section template with topic class and ID"
165+ },
166+ "Include with Leveloffset" : {
167+ "prefix" : " adoc-inc" ,
168+ "body" : [
169+ " include::${1:filename}.adoc[leveloffset=+1]$0"
170+ ],
171+ "description" : " Creates an include statement with leveloffset=+1, automatically adding .adoc extension"
172+ },
173+ "AsciiDoc Collapsible Section" : {
174+ "prefix" : " adoc-collapse" ,
175+ "body" : [
176+ " [[${1:collapsible-section-id},${1:collapsible-section-id}.title]]" ,
177+ " .${2:Section Title}" ,
178+ " [%collapsible, expand-section=\" _collapse_all_\" ]" ,
179+ " ====" ,
180+ " ${3:This is where the text to collapse goes.}" ,
181+ " ===="
182+ ],
183+ "description" : " Creates a collapsible section in AsciiDoc"
184+ }
185+ }
0 commit comments