|
| 1 | +import {Snippets} from "@leiden-plus/lib/language"; |
| 2 | + |
| 3 | +export const snippets = { |
| 4 | + translation: { |
| 5 | + template: "<T=\n ${}\n=T>", |
| 6 | + completion: { |
| 7 | + label: "<T=${translation}=T>", |
| 8 | + displayLabel: "Translation", |
| 9 | + detail: "no language specified", |
| 10 | + info: "<T= translation =T>" |
| 11 | + } |
| 12 | + }, |
| 13 | + translationWithLanguage: { |
| 14 | + template: "<T=.${language id}\n ${}\n=T>", |
| 15 | + completion: { |
| 16 | + label: "<T=.${langId} ${translation}=T>", |
| 17 | + displayLabel: "Translation", |
| 18 | + detail: "other language", |
| 19 | + info: "<T=.lang translation =T>" |
| 20 | + } |
| 21 | + }, |
| 22 | + translationEnglish: { |
| 23 | + template: "<T=.en\n ${}\n=T>", |
| 24 | + completion: { |
| 25 | + label: "<T=.en ${translation}=T>", |
| 26 | + displayLabel: "Translation", |
| 27 | + detail: "English", |
| 28 | + info: "<T=.en translation =T>" |
| 29 | + } |
| 30 | + }, |
| 31 | + translationGerman: { |
| 32 | + template: "<T=.de\n ${}\n=T>", |
| 33 | + completion: { |
| 34 | + label: "<T=.de ${translation}=T>", |
| 35 | + displayLabel: "Translation", |
| 36 | + detail: "German", |
| 37 | + info: "<T=.de ... =T>" |
| 38 | + } |
| 39 | + }, |
| 40 | + |
| 41 | + division: { |
| 42 | + template: "<D=.${n} \n <=\n ${division text}\n =>\n=D>", |
| 43 | + completion: { |
| 44 | + label: "<D=.${n} <= ${division text} =>=D>", |
| 45 | + displayLabel: "Division", |
| 46 | + detail: "other", |
| 47 | + info: "<D=.n <= ... => =D>" |
| 48 | + } |
| 49 | + }, |
| 50 | + divisionRecto: { |
| 51 | + template: "<D=.r \n <=\n ${division text}\n =>\n=D>", |
| 52 | + completion: { |
| 53 | + label: "<D=.r <= ${division text} =>=D>", |
| 54 | + displayLabel: "Division", |
| 55 | + detail: "Recto", |
| 56 | + info: "<D=.r <= ... => =D>" |
| 57 | + } |
| 58 | + }, |
| 59 | + divisionVerso: { |
| 60 | + template: "<D=.v \n <=\n ${division text}\n =>\n=D>", |
| 61 | + completion: { |
| 62 | + label: "<D=.v <= ${division text} =>=D>", |
| 63 | + displayLabel: "Division", |
| 64 | + detail: "Verso", |
| 65 | + info: "<D=.v <= ... => =D>" |
| 66 | + } |
| 67 | + }, |
| 68 | + divisionFragment: { |
| 69 | + template: "<D=.${a}.fragment \n <=\n ${division text}\n =>\n=D>", |
| 70 | + completion: { |
| 71 | + label: "<D=.${a}.fragment <= ${division text} =>=D>", |
| 72 | + displayLabel: "Division", |
| 73 | + detail: "Fragment", |
| 74 | + info: "<D=.a.fragment <= ... => =D>" |
| 75 | + } |
| 76 | + }, |
| 77 | + divisionColumn: { |
| 78 | + template: "<D=.${i}.column \n <=\n ${division text}\n =>\n=D>", |
| 79 | + completion: { |
| 80 | + label: "<D=.${i}.column <= ${division text} =>=D>", |
| 81 | + displayLabel: "Division", |
| 82 | + detail: "Column", |
| 83 | + info: "<D=.i.column <= ... => =D>" |
| 84 | + } |
| 85 | + }, |
| 86 | + divisionOtherType: { |
| 87 | + template: "<D=.${n}.${type} \n <=\n ${division text}\n =>\n=D>", |
| 88 | + completion: { |
| 89 | + label: "<D=.${n}.${type} <= ${division text} =>=D>", |
| 90 | + displayLabel: "Division", |
| 91 | + detail: "other type", |
| 92 | + info: "<D=.n.type <= ... => =D>" |
| 93 | + } |
| 94 | + }, |
| 95 | + |
| 96 | + block: { |
| 97 | + template: "<=\n ${}\n=>", |
| 98 | + completion: { |
| 99 | + label: "<=\n ${text}\n=>", |
| 100 | + displayLabel: "Block", |
| 101 | + info: "<= text =>" |
| 102 | + } |
| 103 | + }, |
| 104 | + |
| 105 | + milestoneLineNumber: { |
| 106 | + template: "((${num}))", |
| 107 | + completion: { |
| 108 | + label: "((${num}))", |
| 109 | + displayLabel: "Milestone line number", |
| 110 | + info: "((1))" |
| 111 | + } |
| 112 | + }, |
| 113 | + milestoneLineNumberBreak: { |
| 114 | + template: "(((${num})))", |
| 115 | + completion: { |
| 116 | + label: "(((${num})))", |
| 117 | + displayLabel: "Milestone line number", |
| 118 | + detail: "with break", |
| 119 | + info: "(((1)))" |
| 120 | + } |
| 121 | + }, |
| 122 | + |
| 123 | + lacuna: { |
| 124 | + template: "[...]", |
| 125 | + completion: { |
| 126 | + label: "[...]", |
| 127 | + displayLabel: "Lacuna (lost text)", |
| 128 | + detail: "", |
| 129 | + info: "[...]" |
| 130 | + } |
| 131 | + }, |
| 132 | + omitted: { |
| 133 | + template: "...", |
| 134 | + completion: { |
| 135 | + label: "...", |
| 136 | + displayLabel: "Omitted", |
| 137 | + detail: "illegible or otherwise untranslatable", |
| 138 | + info: "..." |
| 139 | + } |
| 140 | + }, |
| 141 | + deletion: { |
| 142 | + template: "〚${deleted text}〛", |
| 143 | + completion: { |
| 144 | + label: "〚${deleted text}〛", |
| 145 | + displayLabel: "Deleted text", |
| 146 | + info: "⟦abc⟧" |
| 147 | + } |
| 148 | + }, |
| 149 | + term: { |
| 150 | + template: "<${translation}=${term}>", |
| 151 | + completion: { |
| 152 | + label: "<${translation}=${term}>", |
| 153 | + displayLabel: "Term definition", |
| 154 | + detail: "without language", |
| 155 | + info: "<definition=term>" |
| 156 | + } |
| 157 | + }, |
| 158 | + termWithLanguage: { |
| 159 | + template: "<${translation}~{language id}=${term}>", |
| 160 | + completion: { |
| 161 | + label: "<${translation}~{language id}=${term}>", |
| 162 | + displayLabel: "Term definition", |
| 163 | + detail: "other language", |
| 164 | + info: "<definition~lang=translation>" |
| 165 | + } |
| 166 | + }, |
| 167 | + |
| 168 | + termLatin: { |
| 169 | + template: "<${translation}~la=${term}>", |
| 170 | + completion: { |
| 171 | + label: "<${translation}~la=${term}>", |
| 172 | + displayLabel: "Term definition", |
| 173 | + detail: "Latin term", |
| 174 | + info: "<definition~la=translation>" |
| 175 | + } |
| 176 | + }, |
| 177 | + |
| 178 | + termGreek: { |
| 179 | + template: "<${translation}~grc=${term}>", |
| 180 | + completion: { |
| 181 | + label: "<${translation}~grc=${term}>", |
| 182 | + displayLabel: "Term definition", |
| 183 | + detail: "Greek term", |
| 184 | + info: "<definition~grc=translation>" |
| 185 | + } |
| 186 | + }, |
| 187 | + |
| 188 | + |
| 189 | + foreign: { |
| 190 | + template: "~|${foreign text}|~${lang} ", |
| 191 | + completion: { |
| 192 | + label: "~|${foreign text}|~${lang} ", |
| 193 | + displayLabel: "Foreign text", |
| 194 | + detail: "other language", |
| 195 | + info: "~|ϣ|~cop" |
| 196 | + } |
| 197 | + }, |
| 198 | + foreignLatin: { |
| 199 | + template: "~|${latin text}|~la ", |
| 200 | + completion: { |
| 201 | + label: "~|${latin text}|~la ", |
| 202 | + displayLabel: "Foreign text", |
| 203 | + detail: "Latin", |
| 204 | + info: "~|abc|~la" |
| 205 | + } |
| 206 | + }, |
| 207 | + foreignGreek: { |
| 208 | + template: "~|${greek text}|~grc ", |
| 209 | + completion: { |
| 210 | + label: "~|${greek text}|~grc ", |
| 211 | + displayLabel: "Foreign text", |
| 212 | + detail: "Greek", |
| 213 | + info: "~|αβγ|~grc" |
| 214 | + } |
| 215 | + }, |
| 216 | + |
| 217 | + |
| 218 | + note: { |
| 219 | + template: "/*${note text}*/", |
| 220 | + completion: { |
| 221 | + label: "/*${note text}*/", |
| 222 | + displayLabel: "Note", |
| 223 | + info: "/*abc*/" |
| 224 | + } |
| 225 | + }, |
| 226 | + |
| 227 | + apparatusEntry: { |
| 228 | + template: "<:${lemma}|${reference}:${note}|:>", |
| 229 | + completion: { |
| 230 | + label: "<:${lemma}|${reference}:${note}|:>", |
| 231 | + displayLabel: "Apparatus entry", |
| 232 | + detail: "other reference", |
| 233 | + info: "<:lemma|BGU:note|:>" |
| 234 | + } |
| 235 | + }, |
| 236 | + |
| 237 | + apparatusEntryBGU: { |
| 238 | + template: "<:${lemma}|BGU:${note}|:>", |
| 239 | + completion: { |
| 240 | + label: "<:${lemma}|BGU:${note}|:>", |
| 241 | + displayLabel: "Apparatus entry", |
| 242 | + detail: "BGU", |
| 243 | + info: "<:lemma|BGU:note|:>" |
| 244 | + } |
| 245 | + }, |
| 246 | + |
| 247 | + apparatusEntryBGUDDbDP: { |
| 248 | + template: "<:${lemma}|BGU_DDbDP:${note}|:>", |
| 249 | + completion: { |
| 250 | + label: "<:${lemma}|BGU_DDbDP:${note}|:>", |
| 251 | + displayLabel: "Apparatus entry", |
| 252 | + detail: "BGU-DDbDP", |
| 253 | + info: "<:lemma|BGU_DDbDP:note|:>" |
| 254 | + } |
| 255 | + }, |
| 256 | + |
| 257 | + apparatusEntryNoRef: { |
| 258 | + template: "<:${lemma}|:${note}|:>", |
| 259 | + completion: { |
| 260 | + label: "<:${lemma}|:${note}|:>", |
| 261 | + displayLabel: "Apparatus entry", |
| 262 | + detail: "no reference", |
| 263 | + info: "<:lemma|:note|:>" |
| 264 | + } |
| 265 | + }, |
| 266 | + |
| 267 | +} satisfies Snippets |
0 commit comments