2021-12-15 12:05:22 +00:00
|
|
|
{
|
|
|
|
"information_for_contributors": [
|
|
|
|
"This file has been converted from https://github.com/jlelong/vscode-latex-basics/blob/master/syntaxes/Bibtex.tmLanguage.json",
|
|
|
|
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
|
|
|
"Once accepted there, we are happy to receive an update request."
|
|
|
|
],
|
2024-04-09 10:20:39 +00:00
|
|
|
"version": "https://github.com/jlelong/vscode-latex-basics/commit/c787db94a56bd93131ce0938046063320a02cc73",
|
2021-12-15 12:05:22 +00:00
|
|
|
"name": "BibTeX",
|
|
|
|
"scopeName": "text.bibtex",
|
2023-09-11 09:38:45 +00:00
|
|
|
"comment": "Grammar based on description from https://github.com/aclements/biblib\n",
|
2021-12-15 12:05:22 +00:00
|
|
|
"patterns": [
|
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"captures": {
|
2021-12-15 12:05:22 +00:00
|
|
|
"0": {
|
|
|
|
"name": "punctuation.definition.comment.bibtex"
|
|
|
|
}
|
|
|
|
},
|
2024-04-09 10:20:39 +00:00
|
|
|
"match": "@(?i:comment)(?=[\\s{(])",
|
2023-09-11 09:38:45 +00:00
|
|
|
"name": "comment.block.at-sign.bibtex"
|
2021-12-15 12:05:22 +00:00
|
|
|
},
|
2023-03-29 09:38:06 +00:00
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"begin": "((@)(?i:preamble))\\s*(\\{)\\s*",
|
|
|
|
"beginCaptures": {
|
|
|
|
"1": {
|
|
|
|
"name": "keyword.other.preamble.bibtex"
|
|
|
|
},
|
|
|
|
"2": {
|
|
|
|
"name": "punctuation.definition.keyword.bibtex"
|
|
|
|
},
|
|
|
|
"3": {
|
|
|
|
"name": "punctuation.section.preamble.begin.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"end": "\\}",
|
|
|
|
"endCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.section.preamble.end.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"name": "meta.preamble.braces.bibtex",
|
2023-03-29 09:38:06 +00:00
|
|
|
"patterns": [
|
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"include": "#field_value"
|
2023-03-29 09:38:06 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2021-12-15 12:05:22 +00:00
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"begin": "((@)(?i:preamble))\\s*(\\()\\s*",
|
|
|
|
"beginCaptures": {
|
|
|
|
"1": {
|
|
|
|
"name": "keyword.other.preamble.bibtex"
|
|
|
|
},
|
|
|
|
"2": {
|
|
|
|
"name": "punctuation.definition.keyword.bibtex"
|
|
|
|
},
|
|
|
|
"3": {
|
|
|
|
"name": "punctuation.section.preamble.begin.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"end": "\\)",
|
|
|
|
"endCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.section.preamble.end.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"name": "meta.preamble.parenthesis.bibtex",
|
|
|
|
"patterns": [
|
|
|
|
{
|
|
|
|
"include": "#field_value"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"begin": "((@)(?i:string))\\s*(\\{)\\s*([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)",
|
2021-12-15 12:05:22 +00:00
|
|
|
"beginCaptures": {
|
|
|
|
"1": {
|
|
|
|
"name": "keyword.other.string-constant.bibtex"
|
|
|
|
},
|
|
|
|
"2": {
|
|
|
|
"name": "punctuation.definition.keyword.bibtex"
|
|
|
|
},
|
|
|
|
"3": {
|
|
|
|
"name": "punctuation.section.string-constant.begin.bibtex"
|
|
|
|
},
|
|
|
|
"4": {
|
|
|
|
"name": "variable.other.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"end": "\\}",
|
|
|
|
"endCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.section.string-constant.end.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"name": "meta.string-constant.braces.bibtex",
|
|
|
|
"patterns": [
|
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"include": "#field_value"
|
2021-12-15 12:05:22 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"begin": "((@)(?i:string))\\s*(\\()\\s*([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)",
|
2021-12-15 12:05:22 +00:00
|
|
|
"beginCaptures": {
|
|
|
|
"1": {
|
|
|
|
"name": "keyword.other.string-constant.bibtex"
|
|
|
|
},
|
|
|
|
"2": {
|
|
|
|
"name": "punctuation.definition.keyword.bibtex"
|
|
|
|
},
|
|
|
|
"3": {
|
|
|
|
"name": "punctuation.section.string-constant.begin.bibtex"
|
|
|
|
},
|
|
|
|
"4": {
|
|
|
|
"name": "variable.other.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"end": "\\)",
|
|
|
|
"endCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.section.string-constant.end.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"name": "meta.string-constant.parenthesis.bibtex",
|
|
|
|
"patterns": [
|
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"include": "#field_value"
|
2021-12-15 12:05:22 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"begin": "((@)[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\{)\\s*([^\\s,}]*)",
|
2021-12-15 12:05:22 +00:00
|
|
|
"beginCaptures": {
|
|
|
|
"1": {
|
|
|
|
"name": "keyword.other.entry-type.bibtex"
|
|
|
|
},
|
|
|
|
"2": {
|
|
|
|
"name": "punctuation.definition.keyword.bibtex"
|
|
|
|
},
|
|
|
|
"3": {
|
|
|
|
"name": "punctuation.section.entry.begin.bibtex"
|
|
|
|
},
|
|
|
|
"4": {
|
|
|
|
"name": "entity.name.type.entry-key.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"end": "\\}",
|
|
|
|
"endCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.section.entry.end.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"name": "meta.entry.braces.bibtex",
|
|
|
|
"patterns": [
|
2023-03-29 09:38:06 +00:00
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"begin": "([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\=)",
|
2021-12-15 12:05:22 +00:00
|
|
|
"beginCaptures": {
|
|
|
|
"1": {
|
|
|
|
"name": "support.function.key.bibtex"
|
|
|
|
},
|
|
|
|
"2": {
|
|
|
|
"name": "punctuation.separator.key-value.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"end": "(?=[,}])",
|
|
|
|
"name": "meta.key-assignment.bibtex",
|
|
|
|
"patterns": [
|
2023-03-29 09:38:06 +00:00
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"include": "#field_value"
|
2021-12-15 12:05:22 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"begin": "((@)[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\()\\s*([^\\s,]*)",
|
2021-12-15 12:05:22 +00:00
|
|
|
"beginCaptures": {
|
|
|
|
"1": {
|
|
|
|
"name": "keyword.other.entry-type.bibtex"
|
|
|
|
},
|
|
|
|
"2": {
|
|
|
|
"name": "punctuation.definition.keyword.bibtex"
|
|
|
|
},
|
|
|
|
"3": {
|
|
|
|
"name": "punctuation.section.entry.begin.bibtex"
|
|
|
|
},
|
|
|
|
"4": {
|
|
|
|
"name": "entity.name.type.entry-key.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"end": "\\)",
|
|
|
|
"endCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.section.entry.end.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"name": "meta.entry.parenthesis.bibtex",
|
|
|
|
"patterns": [
|
2023-03-29 09:38:06 +00:00
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"begin": "([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\=)",
|
2021-12-15 12:05:22 +00:00
|
|
|
"beginCaptures": {
|
|
|
|
"1": {
|
|
|
|
"name": "support.function.key.bibtex"
|
|
|
|
},
|
|
|
|
"2": {
|
|
|
|
"name": "punctuation.separator.key-value.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"end": "(?=[,)])",
|
|
|
|
"name": "meta.key-assignment.bibtex",
|
|
|
|
"patterns": [
|
2023-03-29 09:38:06 +00:00
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"include": "#field_value"
|
2021-12-15 12:05:22 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"begin": "[^@\\n]",
|
|
|
|
"end": "(?=@)",
|
|
|
|
"name": "comment.block.bibtex"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"repository": {
|
2023-09-11 09:38:45 +00:00
|
|
|
"field_value": {
|
|
|
|
"patterns": [
|
|
|
|
{
|
|
|
|
"include": "#string_content"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"include": "#integer"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"include": "#string_var"
|
|
|
|
},
|
|
|
|
{
|
2024-04-09 10:20:39 +00:00
|
|
|
"match": "#",
|
|
|
|
"name": "keyword.operator.bibtex"
|
2023-09-11 09:38:45 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2021-12-15 12:05:22 +00:00
|
|
|
"integer": {
|
2023-04-28 15:43:01 +00:00
|
|
|
"captures": {
|
|
|
|
"1": {
|
|
|
|
"name": "constant.numeric.bibtex"
|
|
|
|
}
|
2024-04-09 10:20:39 +00:00
|
|
|
},
|
|
|
|
"match": "\\s*(\\d+)\\s*"
|
2021-12-15 12:05:22 +00:00
|
|
|
},
|
|
|
|
"nested_braces": {
|
2023-09-11 09:38:45 +00:00
|
|
|
"begin": "\\{",
|
2021-12-15 12:05:22 +00:00
|
|
|
"beginCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.definition.group.begin.bibtex"
|
|
|
|
}
|
|
|
|
},
|
2023-09-11 09:38:45 +00:00
|
|
|
"end": "\\}",
|
2021-12-15 12:05:22 +00:00
|
|
|
"endCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.definition.group.end.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"patterns": [
|
|
|
|
{
|
|
|
|
"include": "#nested_braces"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"string_content": {
|
|
|
|
"patterns": [
|
|
|
|
{
|
|
|
|
"begin": "\\{",
|
|
|
|
"beginCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.definition.string.begin.bibtex"
|
|
|
|
}
|
|
|
|
},
|
2023-09-11 09:38:45 +00:00
|
|
|
"end": "\\}",
|
2021-12-15 12:05:22 +00:00
|
|
|
"endCaptures": {
|
2023-09-11 09:38:45 +00:00
|
|
|
"0": {
|
2021-12-15 12:05:22 +00:00
|
|
|
"name": "punctuation.definition.string.end.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"patterns": [
|
|
|
|
{
|
|
|
|
"include": "#nested_braces"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"begin": "\"",
|
|
|
|
"beginCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.definition.string.begin.bibtex"
|
|
|
|
}
|
|
|
|
},
|
2023-09-11 09:38:45 +00:00
|
|
|
"end": "\"",
|
2021-12-15 12:05:22 +00:00
|
|
|
"endCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.definition.string.end.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"patterns": [
|
2023-03-29 09:38:06 +00:00
|
|
|
{
|
2023-09-11 09:38:45 +00:00
|
|
|
"include": "#nested_braces"
|
2023-03-29 09:38:06 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
2024-04-09 10:20:39 +00:00
|
|
|
},
|
|
|
|
"string_var": {
|
|
|
|
"captures": {
|
|
|
|
"0": {
|
|
|
|
"name": "support.variable.bibtex"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"match": "[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*"
|
2021-12-15 12:05:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|