| 1 |
{ |
| 2 |
"information_for_contributors": [ |
| 3 |
"This file has been converted from https://github.com/jlelong/vscode-latex-basics/blob/master/syntaxes/Bibtex.tmLanguage.json", |
| 4 |
"If you want to provide a fix or improvement, please create a pull request against the original repository.", |
| 5 |
"Once accepted there, we are happy to receive an update request." |
| 6 |
], |
| 7 |
"version": "https://github.com/jlelong/vscode-latex-basics/commit/36411b38cf4ed18e02050249e2162b1316488686", |
| 8 |
"name": "bibtex", |
| 9 |
"scopeName": "text.bibtex", |
| 10 |
"comment": "Grammar based on description from https://github.com/aclements/biblib\n", |
| 11 |
"patterns": [ |
| 12 |
{ |
| 13 |
"match": "@(?i:comment)(?=[\\s{(])", |
| 14 |
"captures": { |
| 15 |
"0": { |
| 16 |
"name": "punctuation.definition.comment.bibtex" |
| 17 |
} |
| 18 |
}, |
| 19 |
"name": "comment.block.at-sign.bibtex" |
| 20 |
}, |
| 21 |
{ |
| 22 |
"begin": "((@)(?i:preamble))\\s*(\\{)\\s*", |
| 23 |
"beginCaptures": { |
| 24 |
"1": { |
| 25 |
"name": "keyword.other.preamble.bibtex" |
| 26 |
}, |
| 27 |
"2": { |
| 28 |
"name": "punctuation.definition.keyword.bibtex" |
| 29 |
}, |
| 30 |
"3": { |
| 31 |
"name": "punctuation.section.preamble.begin.bibtex" |
| 32 |
} |
| 33 |
}, |
| 34 |
"end": "\\}", |
| 35 |
"endCaptures": { |
| 36 |
"0": { |
| 37 |
"name": "punctuation.section.preamble.end.bibtex" |
| 38 |
} |
| 39 |
}, |
| 40 |
"name": "meta.preamble.braces.bibtex", |
| 41 |
"patterns": [ |
| 42 |
{ |
| 43 |
"include": "#field_value" |
| 44 |
} |
| 45 |
] |
| 46 |
}, |
| 47 |
{ |
| 48 |
"begin": "((@)(?i:preamble))\\s*(\\()\\s*", |
| 49 |
"beginCaptures": { |
| 50 |
"1": { |
| 51 |
"name": "keyword.other.preamble.bibtex" |
| 52 |
}, |
| 53 |
"2": { |
| 54 |
"name": "punctuation.definition.keyword.bibtex" |
| 55 |
}, |
| 56 |
"3": { |
| 57 |
"name": "punctuation.section.preamble.begin.bibtex" |
| 58 |
} |
| 59 |
}, |
| 60 |
"end": "\\)", |
| 61 |
"endCaptures": { |
| 62 |
"0": { |
| 63 |
"name": "punctuation.section.preamble.end.bibtex" |
| 64 |
} |
| 65 |
}, |
| 66 |
"name": "meta.preamble.parenthesis.bibtex", |
| 67 |
"patterns": [ |
| 68 |
{ |
| 69 |
"include": "#field_value" |
| 70 |
} |
| 71 |
] |
| 72 |
}, |
| 73 |
{ |
| 74 |
"begin": "((@)(?i:string))\\s*(\\{)\\s*([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)", |
| 75 |
"beginCaptures": { |
| 76 |
"1": { |
| 77 |
"name": "keyword.other.string-constant.bibtex" |
| 78 |
}, |
| 79 |
"2": { |
| 80 |
"name": "punctuation.definition.keyword.bibtex" |
| 81 |
}, |
| 82 |
"3": { |
| 83 |
"name": "punctuation.section.string-constant.begin.bibtex" |
| 84 |
}, |
| 85 |
"4": { |
| 86 |
"name": "variable.other.bibtex" |
| 87 |
} |
| 88 |
}, |
| 89 |
"end": "\\}", |
| 90 |
"endCaptures": { |
| 91 |
"0": { |
| 92 |
"name": "punctuation.section.string-constant.end.bibtex" |
| 93 |
} |
| 94 |
}, |
| 95 |
"name": "meta.string-constant.braces.bibtex", |
| 96 |
"patterns": [ |
| 97 |
{ |
| 98 |
"include": "#field_value" |
| 99 |
} |
| 100 |
] |
| 101 |
}, |
| 102 |
{ |
| 103 |
"begin": "((@)(?i:string))\\s*(\\()\\s*([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)", |
| 104 |
"beginCaptures": { |
| 105 |
"1": { |
| 106 |
"name": "keyword.other.string-constant.bibtex" |
| 107 |
}, |
| 108 |
"2": { |
| 109 |
"name": "punctuation.definition.keyword.bibtex" |
| 110 |
}, |
| 111 |
"3": { |
| 112 |
"name": "punctuation.section.string-constant.begin.bibtex" |
| 113 |
}, |
| 114 |
"4": { |
| 115 |
"name": "variable.other.bibtex" |
| 116 |
} |
| 117 |
}, |
| 118 |
"end": "\\)", |
| 119 |
"endCaptures": { |
| 120 |
"0": { |
| 121 |
"name": "punctuation.section.string-constant.end.bibtex" |
| 122 |
} |
| 123 |
}, |
| 124 |
"name": "meta.string-constant.parenthesis.bibtex", |
| 125 |
"patterns": [ |
| 126 |
{ |
| 127 |
"include": "#field_value" |
| 128 |
} |
| 129 |
] |
| 130 |
}, |
| 131 |
{ |
| 132 |
"begin": "((@)[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\{)\\s*([^\\s,}]*)", |
| 133 |
"beginCaptures": { |
| 134 |
"1": { |
| 135 |
"name": "keyword.other.entry-type.bibtex" |
| 136 |
}, |
| 137 |
"2": { |
| 138 |
"name": "punctuation.definition.keyword.bibtex" |
| 139 |
}, |
| 140 |
"3": { |
| 141 |
"name": "punctuation.section.entry.begin.bibtex" |
| 142 |
}, |
| 143 |
"4": { |
| 144 |
"name": "entity.name.type.entry-key.bibtex" |
| 145 |
} |
| 146 |
}, |
| 147 |
"end": "\\}", |
| 148 |
"endCaptures": { |
| 149 |
"0": { |
| 150 |
"name": "punctuation.section.entry.end.bibtex" |
| 151 |
} |
| 152 |
}, |
| 153 |
"name": "meta.entry.braces.bibtex", |
| 154 |
"patterns": [ |
| 155 |
{ |
| 156 |
"begin": "([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\=)", |
| 157 |
"beginCaptures": { |
| 158 |
"1": { |
| 159 |
"name": "support.function.key.bibtex" |
| 160 |
}, |
| 161 |
"2": { |
| 162 |
"name": "punctuation.separator.key-value.bibtex" |
| 163 |
} |
| 164 |
}, |
| 165 |
"end": "(?=[,}])", |
| 166 |
"name": "meta.key-assignment.bibtex", |
| 167 |
"patterns": [ |
| 168 |
{ |
| 169 |
"include": "#field_value" |
| 170 |
} |
| 171 |
] |
| 172 |
} |
| 173 |
] |
| 174 |
}, |
| 175 |
{ |
| 176 |
"begin": "((@)[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\()\\s*([^\\s,]*)", |
| 177 |
"beginCaptures": { |
| 178 |
"1": { |
| 179 |
"name": "keyword.other.entry-type.bibtex" |
| 180 |
}, |
| 181 |
"2": { |
| 182 |
"name": "punctuation.definition.keyword.bibtex" |
| 183 |
}, |
| 184 |
"3": { |
| 185 |
"name": "punctuation.section.entry.begin.bibtex" |
| 186 |
}, |
| 187 |
"4": { |
| 188 |
"name": "entity.name.type.entry-key.bibtex" |
| 189 |
} |
| 190 |
}, |
| 191 |
"end": "\\)", |
| 192 |
"endCaptures": { |
| 193 |
"0": { |
| 194 |
"name": "punctuation.section.entry.end.bibtex" |
| 195 |
} |
| 196 |
}, |
| 197 |
"name": "meta.entry.parenthesis.bibtex", |
| 198 |
"patterns": [ |
| 199 |
{ |
| 200 |
"begin": "([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\=)", |
| 201 |
"beginCaptures": { |
| 202 |
"1": { |
| 203 |
"name": "support.function.key.bibtex" |
| 204 |
}, |
| 205 |
"2": { |
| 206 |
"name": "punctuation.separator.key-value.bibtex" |
| 207 |
} |
| 208 |
}, |
| 209 |
"end": "(?=[,)])", |
| 210 |
"name": "meta.key-assignment.bibtex", |
| 211 |
"patterns": [ |
| 212 |
{ |
| 213 |
"include": "#field_value" |
| 214 |
} |
| 215 |
] |
| 216 |
} |
| 217 |
] |
| 218 |
}, |
| 219 |
{ |
| 220 |
"begin": "[^@\\n]", |
| 221 |
"end": "(?=@)", |
| 222 |
"name": "comment.block.bibtex" |
| 223 |
} |
| 224 |
], |
| 225 |
"repository": { |
| 226 |
"field_value": { |
| 227 |
"patterns": [ |
| 228 |
{ |
| 229 |
"include": "#string_content" |
| 230 |
}, |
| 231 |
{ |
| 232 |
"include": "#integer" |
| 233 |
}, |
| 234 |
{ |
| 235 |
"include": "#string_var" |
| 236 |
}, |
| 237 |
{ |
| 238 |
"name": "keyword.operator.bibtex", |
| 239 |
"match": "#" |
| 240 |
} |
| 241 |
] |
| 242 |
}, |
| 243 |
"integer": { |
| 244 |
"match": "\\s*(\\d+)\\s*", |
| 245 |
"captures": { |
| 246 |
"1": { |
| 247 |
"name": "constant.numeric.bibtex" |
| 248 |
} |
| 249 |
} |
| 250 |
}, |
| 251 |
"nested_braces": { |
| 252 |
"begin": "\\{", |
| 253 |
"beginCaptures": { |
| 254 |
"0": { |
| 255 |
"name": "punctuation.definition.group.begin.bibtex" |
| 256 |
} |
| 257 |
}, |
| 258 |
"end": "\\}", |
| 259 |
"endCaptures": { |
| 260 |
"0": { |
| 261 |
"name": "punctuation.definition.group.end.bibtex" |
| 262 |
} |
| 263 |
}, |
| 264 |
"patterns": [ |
| 265 |
{ |
| 266 |
"include": "#nested_braces" |
| 267 |
} |
| 268 |
] |
| 269 |
}, |
| 270 |
"string_var": { |
| 271 |
"match": "[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*", |
| 272 |
"captures": { |
| 273 |
"0": { |
| 274 |
"name": "support.variable.bibtex" |
| 275 |
} |
| 276 |
} |
| 277 |
}, |
| 278 |
"string_content": { |
| 279 |
"patterns": [ |
| 280 |
{ |
| 281 |
"begin": "\\{", |
| 282 |
"beginCaptures": { |
| 283 |
"0": { |
| 284 |
"name": "punctuation.definition.string.begin.bibtex" |
| 285 |
} |
| 286 |
}, |
| 287 |
"end": "\\}", |
| 288 |
"endCaptures": { |
| 289 |
"0": { |
| 290 |
"name": "punctuation.definition.string.end.bibtex" |
| 291 |
} |
| 292 |
}, |
| 293 |
"patterns": [ |
| 294 |
{ |
| 295 |
"include": "#nested_braces" |
| 296 |
} |
| 297 |
] |
| 298 |
}, |
| 299 |
{ |
| 300 |
"begin": "\"", |
| 301 |
"beginCaptures": { |
| 302 |
"0": { |
| 303 |
"name": "punctuation.definition.string.begin.bibtex" |
| 304 |
} |
| 305 |
}, |
| 306 |
"end": "\"", |
| 307 |
"endCaptures": { |
| 308 |
"0": { |
| 309 |
"name": "punctuation.definition.string.end.bibtex" |
| 310 |
} |
| 311 |
}, |
| 312 |
"patterns": [ |
| 313 |
{ |
| 314 |
"include": "#nested_braces" |
| 315 |
} |
| 316 |
] |
| 317 |
} |
| 318 |
] |
| 319 |
} |
| 320 |
} |
| 321 |
} |
| 322 |
|