Update grammars (#245340)

This commit is contained in:
Alex Ross
2025-04-02 15:41:58 +02:00
committed by GitHub
parent 4064f17252
commit 9a2c94d213
11 changed files with 547 additions and 392 deletions

View File

@@ -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/7b75bae583f3f9802c533e021f882428872c572c",
"version": "https://github.com/jlelong/vscode-latex-basics/commit/a39a1f5ec1dee1c7e6e564ea86ab2c8d8779aa07",
"name": "LaTeX",
"scopeName": "text.tex.latex",
"patterns": [
@@ -121,7 +121,7 @@
]
},
{
"begin": "((?:\\s*)\\\\begin\\{songs\\}\\{.*\\})",
"begin": "(\\s*\\\\begin\\{songs\\}\\{.*\\})",
"captures": {
"1": {
"patterns": [
@@ -136,21 +136,45 @@
"name": "meta.function.environment.songs.latex",
"patterns": [
{
"begin": "\\\\\\[",
"end": "\\]",
"name": "meta.chord.block.latex support.class.chord.block.environment.latex",
"include": "text.tex.latex#songs-chords"
}
]
},
{
"comment": "This scope applies songs-environment coloring between \\\\beginsong and \\\\endsong. Useful in separate files without \\\\begin{songs}.",
"begin": "\\s*((\\\\)beginsong)(?=\\{)",
"captures": {
"1": {
"name": "support.function.be.latex"
},
"2": {
"name": "punctuation.definition.function.latex"
},
"3": {
"name": "punctuation.definition.arguments.begin.latex"
},
"4": {
"name": "punctuation.definition.arguments.end.latex"
}
},
"end": "((\\\\)endsong)(?:\\s*\\n)?",
"name": "meta.function.environment.song.latex",
"patterns": [
{
"include": "#multiline-arg-no-highlight"
},
{
"include": "#multiline-optional-arg-no-highlight"
},
{
"begin": "(?:\\G|(?<=\\]|\\}))\\s*",
"end": "\\s*(?=\\\\endsong)",
"contentName": "meta.data.environment.song.latex",
"patterns": [
{
"include": "$self"
"include": "text.tex.latex#songs-chords"
}
]
},
{
"match": "\\^",
"name": "meta.chord.block.latex support.class.chord.block.environment.latex"
},
{
"include": "$self"
}
]
},
@@ -2198,7 +2222,7 @@
"include": "#definition-label"
},
{
"include": "text.tex#math"
"include": "text.tex#math-content"
},
{
"include": "$self"
@@ -2232,7 +2256,7 @@
"include": "#definition-label"
},
{
"include": "text.tex#math"
"include": "text.tex#math-content"
},
{
"include": "$self"
@@ -2349,11 +2373,11 @@
]
}
},
"contentName": "meta.embedded.internal_only_markdown_latex_combined",
"contentName": "meta.embedded.markdown_latex_combined",
"end": "(\\\\end\\{markdown\\})",
"patterns": [
{
"include": "text.tex.internal_only_markdown_latex_combined"
"include": "text.tex.markdown_latex_combined"
}
]
},
@@ -2949,7 +2973,7 @@
"name": "meta.function.verb.latex"
},
{
"begin": "((\\\\)(?:directlua|luadirect))(\\{)",
"begin": "((\\\\)(?:directlua|luadirect|luaexec))(\\{)",
"beginCaptures": {
"1": {
"name": "support.function.verb.latex"
@@ -2994,7 +3018,7 @@
"name": "meta.math.block.latex support.class.math.block.environment.latex",
"patterns": [
{
"include": "text.tex#math"
"include": "text.tex#math-content"
},
{
"include": "$self"
@@ -3021,7 +3045,7 @@
"name": "constant.character.escape.latex"
},
{
"include": "text.tex#math"
"include": "text.tex#math-content"
},
{
"include": "$self"
@@ -3048,7 +3072,7 @@
"name": "constant.character.escape.latex"
},
{
"include": "text.tex#math"
"include": "text.tex#math-content"
},
{
"include": "$self"
@@ -3071,7 +3095,7 @@
"name": "meta.math.block.latex support.class.math.block.environment.latex",
"patterns": [
{
"include": "text.tex#math"
"include": "text.tex#math-content"
},
{
"include": "$self"
@@ -3250,7 +3274,7 @@
]
},
"multiline-optional-arg-no-highlight": {
"begin": "\\G\\[",
"begin": "(?:\\G|(?<=\\}))\\s*\\[",
"beginCaptures": {
"0": {
"name": "punctuation.definition.arguments.optional.begin.latex"
@@ -3269,6 +3293,26 @@
}
]
},
"multiline-arg-no-highlight": {
"begin": "\\G\\{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.arguments.begin.latex"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.arguments.end.latex"
}
},
"name": "meta.parameter.latex",
"patterns": [
{
"include": "$self"
}
]
},
"optional-arg-bracket": {
"patterns": [
{
@@ -3354,6 +3398,27 @@
"name": "meta.parameter.optional.latex"
}
]
},
"songs-chords": {
"patterns": [
{
"begin": "\\\\\\[",
"end": "\\]",
"name": "meta.chord.block.latex support.class.chord.block.environment.latex",
"patterns": [
{
"include": "$self"
}
]
},
{
"match": "\\^",
"name": "meta.chord.block.latex support.class.chord.block.environment.latex"
},
{
"include": "$self"
}
]
}
}
}