mirror of
https://github.com/Microsoft/vscode
synced 2024-10-12 06:17:18 +00:00
Update latex language grammar and configuration (#140801)
This commit is contained in:
parent
5071afbbb8
commit
3e9acdd3d5
|
@ -6,11 +6,11 @@
|
|||
"git": {
|
||||
"name": "jlelong/vscode-latex-basics",
|
||||
"repositoryUrl": "https://github.com/jlelong/vscode-latex-basics",
|
||||
"commitHash": "e1bb99ae10eae344e7c72f5b17e81ff7377991c4"
|
||||
"commitHash": "de12bcd961c686e147190f15a951b4336f0128e4"
|
||||
}
|
||||
},
|
||||
"license": "MIT",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"description": "The files in syntaxes/ were originally part of https://github.com/James-Yu/LaTeX-Workshop. They have been extracted in the hope that they can useful outside of the LaTeX-Workshop extension.",
|
||||
"licenseDetail": [
|
||||
"Copyright (c) vscode-latex-basics authors",
|
||||
|
|
|
@ -17,24 +17,74 @@
|
|||
["\\left\\{", "\\right\\}"],
|
||||
["\\left\\{", "\\right."],
|
||||
["\\left.", "\\right\\}"],
|
||||
["\\left<", "\\right>"]
|
||||
["\\left<", "\\right>"],
|
||||
["\\bigl(", "\\bigr)"],
|
||||
["\\bigl[", "\\bigr]"],
|
||||
["\\bigl\\{", "\\bigr\\}"],
|
||||
["\\Bigl(", "\\Bigr)"],
|
||||
["\\Bigl[", "\\Bigr]"],
|
||||
["\\Bigl\\{", "\\Bigr\\}"],
|
||||
["\\biggl(", "\\biggr)"],
|
||||
["\\biggl[", "\\biggr]"],
|
||||
["\\biggl\\{", "\\biggr\\}"],
|
||||
["\\Biggl(", "\\Biggr)"],
|
||||
["\\Biggl[", "\\Biggr]"],
|
||||
["\\Biggl\\{", "\\Biggr\\}"],
|
||||
["\\langle", "\\rangle"],
|
||||
["\\lvert", "\\rvert"],
|
||||
["\\lVert", "\\rVert"],
|
||||
["\\left|", "\\right|"],
|
||||
["\\left\\vert", "\\right\\vert"],
|
||||
["\\left\\|", "\\right\\|"],
|
||||
["\\left\\Vert", "\\right\\Vert"],
|
||||
["\\left\\langle", "\\right\\rangle"],
|
||||
["\\left\\lvert", "\\right\\rvert"],
|
||||
["\\left\\lVert", "\\right\\rVert"],
|
||||
["\\bigl\\langle", "\\bigr\\rangle"],
|
||||
["\\bigl|", "\\bigr|"],
|
||||
["\\bigl\\vert", "\\bigr\\vert"],
|
||||
["\\bigl\\lvert", "\\bigr\\rvert"],
|
||||
["\\bigl\\|", "\\bigr\\|"],
|
||||
["\\bigl\\lVert", "\\bigr\\rVert"],
|
||||
["\\bigl\\Vert", "\\bigr\\Vert"],
|
||||
["\\Bigl\\langle", "\\Bigr\\rangle"],
|
||||
["\\Bigl|", "\\Bigr|"],
|
||||
["\\Bigl\\lvert", "\\Bigr\\rvert"],
|
||||
["\\Bigl\\vert", "\\Bigr\\vert"],
|
||||
["\\Bigl\\|", "\\Bigr\\|"],
|
||||
["\\Bigl\\lVert", "\\Bigr\\rVert"],
|
||||
["\\Bigl\\Vert", "\\Bigr\\Vert"],
|
||||
["\\biggl\\langle", "\\biggr\\rangle"],
|
||||
["\\biggl|", "\\biggr|"],
|
||||
["\\biggl\\lvert", "\\biggr\\rvert"],
|
||||
["\\biggl\\vert", "\\biggr\\vert"],
|
||||
["\\biggl\\|", "\\biggr\\|"],
|
||||
["\\biggl\\lVert", "\\biggr\\rVert"],
|
||||
["\\biggl\\Vert", "\\biggr\\Vert"],
|
||||
["\\Biggl\\langle", "\\Biggr\\rangle"],
|
||||
["\\Biggl|", "\\Biggr|"],
|
||||
["\\Biggl\\lvert", "\\Biggr\\rvert"],
|
||||
["\\Biggl\\vert", "\\Biggr\\vert"],
|
||||
["\\Biggl\\|", "\\Biggr\\|"],
|
||||
["\\Biggl\\lVert", "\\Biggr\\rVert"],
|
||||
["\\Biggl\\Vert", "\\Biggr\\Vert"]
|
||||
],
|
||||
"autoClosingPairs": [
|
||||
["\\left(", "\\right)"],
|
||||
["\\left[", "\\right]"],
|
||||
["\\left{", "\\right}"],
|
||||
["\\left\\{", "\\right\\}"],
|
||||
["\\bigl(", "\\bigr)"],
|
||||
["\\bigl[", "\\bigr]"],
|
||||
["\\bigl{", "\\bigr}"],
|
||||
["\\bigl\\{", "\\bigr\\}"],
|
||||
["\\Bigl(", "\\Bigr)"],
|
||||
["\\Bigl[", "\\Bigr]"],
|
||||
["\\Bigl{", "\\Bigr}"],
|
||||
["\\Bigl\\{", "\\Bigr\\}"],
|
||||
["\\biggl(", "\\biggr)"],
|
||||
["\\biggl[", "\\biggr]"],
|
||||
["\\biggl{", "\\biggr}"],
|
||||
["\\biggl\\{", "\\biggr\\}"],
|
||||
["\\Biggl(", "\\Biggr)"],
|
||||
["\\Biggl[", "\\Biggr]"],
|
||||
["\\Biggl{", "\\Biggr}"],
|
||||
["\\Biggl\\{", "\\Biggr\\}"],
|
||||
["\\(", "\\)"],
|
||||
["\\[", "\\]"],
|
||||
["\\{", "\\}"],
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"comments": {
|
||||
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
|
||||
"blockComment": [
|
||||
"<!--",
|
||||
"-->"
|
||||
|
@ -21,24 +20,74 @@
|
|||
["\\left\\{", "\\right\\}"],
|
||||
["\\left\\{", "\\right."],
|
||||
["\\left.", "\\right\\}"],
|
||||
["\\left<", "\\right>"]
|
||||
["\\left<", "\\right>"],
|
||||
["\\bigl(", "\\bigr)"],
|
||||
["\\bigl[", "\\bigr]"],
|
||||
["\\bigl\\{", "\\bigr\\}"],
|
||||
["\\Bigl(", "\\Bigr)"],
|
||||
["\\Bigl[", "\\Bigr]"],
|
||||
["\\Bigl\\{", "\\Bigr\\}"],
|
||||
["\\biggl(", "\\biggr)"],
|
||||
["\\biggl[", "\\biggr]"],
|
||||
["\\biggl\\{", "\\biggr\\}"],
|
||||
["\\Biggl(", "\\Biggr)"],
|
||||
["\\Biggl[", "\\Biggr]"],
|
||||
["\\Biggl\\{", "\\Biggr\\}"],
|
||||
["\\langle", "\\rangle"],
|
||||
["\\lvert", "\\rvert"],
|
||||
["\\lVert", "\\rVert"],
|
||||
["\\left|", "\\right|"],
|
||||
["\\left\\vert", "\\right\\vert"],
|
||||
["\\left\\|", "\\right\\|"],
|
||||
["\\left\\Vert", "\\right\\Vert"],
|
||||
["\\left\\langle", "\\right\\rangle"],
|
||||
["\\left\\lvert", "\\right\\rvert"],
|
||||
["\\left\\lVert", "\\right\\rVert"],
|
||||
["\\bigl\\langle", "\\bigr\\rangle"],
|
||||
["\\bigl|", "\\bigr|"],
|
||||
["\\bigl\\vert", "\\bigr\\vert"],
|
||||
["\\bigl\\lvert", "\\bigr\\rvert"],
|
||||
["\\bigl\\|", "\\bigr\\|"],
|
||||
["\\bigl\\lVert", "\\bigr\\rVert"],
|
||||
["\\bigl\\Vert", "\\bigr\\Vert"],
|
||||
["\\Bigl\\langle", "\\Bigr\\rangle"],
|
||||
["\\Bigl|", "\\Bigr|"],
|
||||
["\\Bigl\\lvert", "\\Bigr\\rvert"],
|
||||
["\\Bigl\\vert", "\\Bigr\\vert"],
|
||||
["\\Bigl\\|", "\\Bigr\\|"],
|
||||
["\\Bigl\\lVert", "\\Bigr\\rVert"],
|
||||
["\\Bigl\\Vert", "\\Bigr\\Vert"],
|
||||
["\\biggl\\langle", "\\biggr\\rangle"],
|
||||
["\\biggl|", "\\biggr|"],
|
||||
["\\biggl\\lvert", "\\biggr\\rvert"],
|
||||
["\\biggl\\vert", "\\biggr\\vert"],
|
||||
["\\biggl\\|", "\\biggr\\|"],
|
||||
["\\biggl\\lVert", "\\biggr\\rVert"],
|
||||
["\\biggl\\Vert", "\\biggr\\Vert"],
|
||||
["\\Biggl\\langle", "\\Biggr\\rangle"],
|
||||
["\\Biggl|", "\\Biggr|"],
|
||||
["\\Biggl\\lvert", "\\Biggr\\rvert"],
|
||||
["\\Biggl\\vert", "\\Biggr\\vert"],
|
||||
["\\Biggl\\|", "\\Biggr\\|"],
|
||||
["\\Biggl\\lVert", "\\Biggr\\rVert"],
|
||||
["\\Biggl\\Vert", "\\Biggr\\Vert"]
|
||||
],
|
||||
"autoClosingPairs": [
|
||||
["\\left(", "\\right)"],
|
||||
["\\left[", "\\right]"],
|
||||
["\\left{", "\\right}"],
|
||||
["\\left\\{", "\\right\\}"],
|
||||
["\\bigl(", "\\bigr)"],
|
||||
["\\bigl[", "\\bigr]"],
|
||||
["\\bigl{", "\\bigr}"],
|
||||
["\\bigl\\{", "\\bigr\\}"],
|
||||
["\\Bigl(", "\\Bigr)"],
|
||||
["\\Bigl[", "\\Bigr]"],
|
||||
["\\Bigl{", "\\Bigr}"],
|
||||
["\\Bigl\\{", "\\Bigr\\}"],
|
||||
["\\biggl(", "\\biggr)"],
|
||||
["\\biggl[", "\\biggr]"],
|
||||
["\\biggl{", "\\biggr}"],
|
||||
["\\biggl\\{", "\\biggr\\}"],
|
||||
["\\Biggl(", "\\Biggr)"],
|
||||
["\\Biggl[", "\\Biggr]"],
|
||||
["\\Biggl{", "\\Biggr}"],
|
||||
["\\Biggl\\{", "\\Biggr\\}"],
|
||||
["\\(", "\\)"],
|
||||
["\\[", "\\]"],
|
||||
["\\{", "\\}"],
|
||||
|
@ -56,19 +105,19 @@
|
|||
["$", "$"],
|
||||
["`", "`"],
|
||||
["_", "_"],
|
||||
["*", "*"],
|
||||
["*", "*"]
|
||||
],
|
||||
"indentationRules": {
|
||||
"increaseIndentPattern": "\\\\begin{(?!document)([^}]*)}(?!.*\\\\end{\\1})",
|
||||
"decreaseIndentPattern": "^\\s*\\\\end{(?!document)"
|
||||
},
|
||||
"autoCloseBefore": ";:.,=}])>\\` \n\t$",
|
||||
"wordPattern": "([^\\s`'\"~_!?|$#@%^&*\\-=+;:,.<>(){}[\\]\\/]+)",
|
||||
"folding": {
|
||||
"offSide": true,
|
||||
"markers": {
|
||||
"start": "^\\s*<!--\\s*#?region\\b.*-->",
|
||||
"end": "^\\s*<!--\\s*#?endregion\\b.*-->"
|
||||
}
|
||||
},
|
||||
"autoCloseBefore": ";:.,=}])>\\` \n\t$",
|
||||
"wordPattern": "([^\\s`'\"~_!?|$#@%^&*\\-=+;:,.<>(){}[\\]\\/]+)"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"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."
|
||||
],
|
||||
"version": "https://github.com/jlelong/vscode-latex-basics/commit/45cf7d1b88b959dcb16bccf60da7ef4494c1acc9",
|
||||
"version": "https://github.com/jlelong/vscode-latex-basics/commit/9cf1f20ba492010ce6ac2ae22727ed754ee6c8cd",
|
||||
"name": "BibTeX",
|
||||
"scopeName": "text.bibtex",
|
||||
"comment": "Grammar based on description from http://artis.imag.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html#comment\n\t\n\tTODO: Does not support @preamble\n\t",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"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."
|
||||
],
|
||||
"version": "https://github.com/jlelong/vscode-latex-basics/commit/e1bb99ae10eae344e7c72f5b17e81ff7377991c4",
|
||||
"version": "https://github.com/jlelong/vscode-latex-basics/commit/de12bcd961c686e147190f15a951b4336f0128e4",
|
||||
"name": "LaTeX",
|
||||
"scopeName": "text.tex.latex",
|
||||
"patterns": [
|
||||
|
@ -465,7 +465,7 @@
|
|||
"end": "(\\\\end\\{\\2\\}(?:\\s*\\n)?)"
|
||||
},
|
||||
{
|
||||
"begin": "((?:\\s*)\\\\begin\\{((?:julia|jl)code(?:\\*)?)\\}(?:\\[.*\\])?)",
|
||||
"begin": "((?:\\s*)\\\\begin\\{((?:julia|jl)(?:code|verbatim|block|concode|console|converbatim)(?:\\*)?)\\}(?:\\[.*\\])?)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"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."
|
||||
],
|
||||
"version": "https://github.com/jlelong/vscode-latex-basics/commit/afcc321aa1c119c37eb1aa3e2c1aa30bd039dd7f",
|
||||
"version": "https://github.com/jlelong/vscode-latex-basics/commit/d305bcea7410e19e32d2334f453c34c6d7e05edf",
|
||||
"name": "TeX",
|
||||
"scopeName": "text.tex",
|
||||
"patterns": [
|
||||
|
@ -167,7 +167,7 @@
|
|||
"name": "punctuation.math.bracket.pair.tex"
|
||||
},
|
||||
{
|
||||
"match": "\\\\(left|right|((big|bigg|Big|Bigg)[lr]?))([\\(\\[\\<\\>\\]\\)\\.]|\\\\{|\\\\})",
|
||||
"match": "\\\\(left|right|((big|bigg|Big|Bigg)[lr]?))([\\(\\[\\<\\>\\]\\)\\.\\|]|\\\\[{}|]|\\\\[lr]?[Vv]ert|\\\\[lr]angle|\\\\\\|)",
|
||||
"name": "punctuation.math.bracket.pair.big.tex"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"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."
|
||||
],
|
||||
"version": "https://github.com/jlelong/vscode-latex-basics/commit/db888fc191f6b5610cd6866cc49017fc3dfb00b5",
|
||||
"version": "https://github.com/jlelong/vscode-latex-basics/commit/5f26a6daf70352a6f3f40b3b4437a605f5d954ee",
|
||||
"name": "Markdown",
|
||||
"scopeName": "text.tex.markdown_latex_combined",
|
||||
"patterns": [
|
||||
|
@ -1784,6 +1784,72 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"fenced_code_block_latex": {
|
||||
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(latex|tex)((\\s+|:|,|\\{|\\?)[^`~]*)?$)",
|
||||
"name": "markup.fenced_code.block.markdown",
|
||||
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
|
||||
"beginCaptures": {
|
||||
"3": {
|
||||
"name": "punctuation.definition.markdown"
|
||||
},
|
||||
"4": {
|
||||
"name": "fenced_code.block.language.markdown"
|
||||
},
|
||||
"5": {
|
||||
"name": "fenced_code.block.language.attributes.markdown"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"3": {
|
||||
"name": "punctuation.definition.markdown"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(^|\\G)(\\s*)(.*)",
|
||||
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
|
||||
"contentName": "meta.embedded.block.latex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.tex.latex"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"fenced_code_block_bibtex": {
|
||||
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bibtex)((\\s+|:|,|\\{|\\?)[^`~]*)?$)",
|
||||
"name": "markup.fenced_code.block.markdown",
|
||||
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
|
||||
"beginCaptures": {
|
||||
"3": {
|
||||
"name": "punctuation.definition.markdown"
|
||||
},
|
||||
"4": {
|
||||
"name": "fenced_code.block.language.markdown"
|
||||
},
|
||||
"5": {
|
||||
"name": "fenced_code.block.language.attributes.markdown"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"3": {
|
||||
"name": "punctuation.definition.markdown"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(^|\\G)(\\s*)(.*)",
|
||||
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
|
||||
"contentName": "meta.embedded.block.bibtex",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.bibtex"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"fenced_code_block": {
|
||||
"patterns": [
|
||||
{
|
||||
|
@ -1942,6 +2008,12 @@
|
|||
{
|
||||
"include": "#fenced_code_block_elixir"
|
||||
},
|
||||
{
|
||||
"include": "#fenced_code_block_latex"
|
||||
},
|
||||
{
|
||||
"include": "#fenced_code_block_bibtex"
|
||||
},
|
||||
{
|
||||
"include": "#fenced_code_block_unknown"
|
||||
}
|
||||
|
@ -2480,13 +2552,13 @@
|
|||
"image-inline": {
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.markdown"
|
||||
"name": "punctuation.definition.link.description.begin.markdown"
|
||||
},
|
||||
"2": {
|
||||
"name": "string.other.link.description.markdown"
|
||||
},
|
||||
"4": {
|
||||
"name": "punctuation.definition.string.end.markdown"
|
||||
"name": "punctuation.definition.link.description.end.markdown"
|
||||
},
|
||||
"5": {
|
||||
"name": "punctuation.definition.metadata.markdown"
|
||||
|
@ -2537,13 +2609,13 @@
|
|||
"image-ref": {
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.markdown"
|
||||
"name": "punctuation.definition.link.description.begin.markdown"
|
||||
},
|
||||
"2": {
|
||||
"name": "string.other.link.description.markdown"
|
||||
},
|
||||
"4": {
|
||||
"name": "punctuation.definition.string.begin.markdown"
|
||||
"name": "punctuation.definition.link.description.end.markdown"
|
||||
},
|
||||
"5": {
|
||||
"name": "punctuation.definition.constant.markdown"
|
||||
|
@ -2652,13 +2724,13 @@
|
|||
"link-inline": {
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.markdown"
|
||||
"name": "punctuation.definition.link.title.begin.markdown"
|
||||
},
|
||||
"2": {
|
||||
"name": "string.other.link.title.markdown"
|
||||
},
|
||||
"4": {
|
||||
"name": "punctuation.definition.string.end.markdown"
|
||||
"name": "punctuation.definition.link.title.end.markdown"
|
||||
},
|
||||
"5": {
|
||||
"name": "punctuation.definition.metadata.markdown"
|
||||
|
@ -2709,13 +2781,13 @@
|
|||
"link-ref": {
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.markdown"
|
||||
"name": "punctuation.definition.link.title.begin.markdown"
|
||||
},
|
||||
"2": {
|
||||
"name": "string.other.link.title.markdown"
|
||||
},
|
||||
"4": {
|
||||
"name": "punctuation.definition.string.end.markdown"
|
||||
"name": "punctuation.definition.link.title.end.markdown"
|
||||
},
|
||||
"5": {
|
||||
"name": "punctuation.definition.constant.begin.markdown"
|
||||
|
@ -2733,13 +2805,13 @@
|
|||
"link-ref-literal": {
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.markdown"
|
||||
"name": "punctuation.definition.link.title.begin.markdown"
|
||||
},
|
||||
"2": {
|
||||
"name": "string.other.link.title.markdown"
|
||||
},
|
||||
"4": {
|
||||
"name": "punctuation.definition.string.end.markdown"
|
||||
"name": "punctuation.definition.link.title.end.markdown"
|
||||
},
|
||||
"5": {
|
||||
"name": "punctuation.definition.constant.begin.markdown"
|
||||
|
@ -2754,13 +2826,13 @@
|
|||
"link-ref-shortcut": {
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.markdown"
|
||||
"name": "punctuation.definition.link.title.begin.markdown"
|
||||
},
|
||||
"2": {
|
||||
"name": "string.other.link.title.markdown"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.string.end.markdown"
|
||||
"name": "punctuation.definition.link.title.end.markdown"
|
||||
}
|
||||
},
|
||||
"match": "(\\[)(\\S+?)(\\])",
|
||||
|
|
Loading…
Reference in a new issue