Skip to content

Commit

Permalink
Update grammar files to jlelong/vscode-latex-basics@635fd94
Browse files Browse the repository at this point in the history
  • Loading branch information
jlelong committed Jan 26, 2025
1 parent f7d2d84 commit 7c8a632
Show file tree
Hide file tree
Showing 7 changed files with 132 additions and 16 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2715,6 +2715,6 @@
"sinon": "^19.0.2",
"textmate-bailout": "^1.1.0",
"typescript": "^5.7.2",
"vscode-extend-language": "^0.2.2"
"vscode-extend-language": "0.3.0"
}
}
45 changes: 44 additions & 1 deletion syntax/DocTeX.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,49 @@
}
]
},
{
"begin": "\\s*\\\\begin\\{(?:javacode|javaverbatim|javablock|javaconcode|javaconsole|javaconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",
"end": "\\s*\\\\end\\{(?:javacode|javaverbatim|javablock|javaconcode|javaconsole|javaconverbatim)\\*?\\}",
"captures": {
"0": {
"patterns": [
{
"include": "#begin-env-tokenizer"
}
]
}
},
"patterns": [
{
"include": "#multiline-optional-arg-no-highlight"
},
{
"begin": "(?:\\G|(?<=\\]))(\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.arguments.begin.latex"
}
},
"end": "(\\})",
"endCaptures": {
"1": {
"name": "punctuation.definition.arguments.end.latex"
}
},
"contentName": "variable.parameter.function.latex"
},
{
"begin": "^(?=\\s*)",
"end": "^\\s*(?=\\\\end\\{(?:javacode|javaverbatim|javablock|javaconcode|javaconsole|javaconverbatim)\\*?\\})",
"contentName": "source.java",
"patterns": [
{
"include": "source.java"
}
]
}
]
},
{
"begin": "\\s*\\\\begin\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",
"end": "\\s*\\\\end\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\}",
Expand Down Expand Up @@ -1160,7 +1203,7 @@
]
},
{
"begin": "\\s*\\\\begin\\{([a-zA-Z]*code|lstlisting|minted|pyglist)\\*?\\}(?:\\[.*\\])?(?:\\{.*\\})?",
"begin": "\\s*\\\\begin\\{((?:[a-zA-Z]*code|lstlisting|minted|pyglist)\\*?)\\}(?:\\[.*\\])?(?:\\{.*\\})?",
"captures": {
"0": {
"patterns": [
Expand Down
45 changes: 44 additions & 1 deletion syntax/LaTeX.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,49 @@
}
]
},
{
"begin": "\\s*\\\\begin\\{(?:javacode|javaverbatim|javablock|javaconcode|javaconsole|javaconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",
"end": "\\s*\\\\end\\{(?:javacode|javaverbatim|javablock|javaconcode|javaconsole|javaconverbatim)\\*?\\}",
"captures": {
"0": {
"patterns": [
{
"include": "#begin-env-tokenizer"
}
]
}
},
"patterns": [
{
"include": "#multiline-optional-arg-no-highlight"
},
{
"begin": "(?:\\G|(?<=\\]))(\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.arguments.begin.latex"
}
},
"end": "(\\})",
"endCaptures": {
"1": {
"name": "punctuation.definition.arguments.end.latex"
}
},
"contentName": "variable.parameter.function.latex"
},
{
"begin": "^(?=\\s*)",
"end": "^\\s*(?=\\\\end\\{(?:javacode|javaverbatim|javablock|javaconcode|javaconsole|javaconverbatim)\\*?\\})",
"contentName": "source.java",
"patterns": [
{
"include": "source.java"
}
]
}
]
},
{
"begin": "\\s*\\\\begin\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)",
"end": "\\s*\\\\end\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\}",
Expand Down Expand Up @@ -1099,7 +1142,7 @@
]
},
{
"begin": "\\s*\\\\begin\\{([a-zA-Z]*code|lstlisting|minted|pyglist)\\*?\\}(?:\\[.*\\])?(?:\\{.*\\})?",
"begin": "\\s*\\\\begin\\{((?:[a-zA-Z]*code|lstlisting|minted|pyglist)\\*?)\\}(?:\\[.*\\])?(?:\\{.*\\})?",
"captures": {
"0": {
"patterns": [
Expand Down
2 changes: 1 addition & 1 deletion syntax/cpp-grammar-bailout.tmLanguage.json

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions syntax/latex-cpp-embedded-language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
{"open":"(", "close":")"},
{"open":"'", "close":"'", "notIn":["string", "comment"]},
{"open":"\"", "close":"\"", "notIn":["string"]},
{"open":"/*", "close":"*/", "notIn":["string", "comment"]}
{"open":"/*", "close":"*/", "notIn":["string", "comment"]},
{"open":"/**", "close":" */", "notIn":["string"]}
],
"surroundingPairs": [
["{", "}"],
Expand All @@ -34,7 +35,16 @@
"end": "^\\s*#pragma\\s+endregion\\b"
}
},
"indentationRules": {
"decreaseIndentPattern": {
"pattern": "^\\s*[\\}\\]\\)].*$"
},
"increaseIndentPattern": {
"pattern": "^.*(\\{[^}]*|\\([^)]*|\\[[^\\]]*)$"
}
},
"onEnterRules": [
{"previousLineText":"^\\s*(((else ?)?if|for|while)\\s*\\(.*\\)\\s*|else\\s*)$", "beforeText":"^\\s+([^{i\\s]|i(?!f\\b))", "action":{"indent":"outdent"}}
{"previousLineText":"^\\s*(((else ?)?if|for|while)\\s*\\(.*\\)\\s*|else\\s*)$", "beforeText":"^\\s+([^{i\\s]|i(?!f\\b))", "action":{"indent":"outdent"}},
{"beforeText":{"pattern":"//.*"},"afterText":{"pattern":"^(?!\\s*$).+"},"action":{"indent":"none", "appendText":"// "}}
]
}
32 changes: 26 additions & 6 deletions syntax/markdown-latex-combined.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/microsoft/vscode-markdown-tm-grammar/commit/f75d5f55730e72ee7ff386841949048b2395e440",
"version": "https://github.com/microsoft/vscode-markdown-tm-grammar/commit/7418dd20d76c72e82fadee2909e03239e9973b35",
"name": "Markdown",
"scopeName": "text.tex.markdown_latex_combined",
"patterns": [
Expand Down Expand Up @@ -2483,14 +2483,34 @@
"name": "meta.separator.markdown"
},
"frontMatter": {
"begin": "\\A-{3}\\s*$",
"contentName": "meta.embedded.block.frontmatter",
"begin": "\\A(?=(-{3,}))",
"end": "^ {,3}\\1-*[ \\t]*$|^[ \\t]*\\.{3}$",
"applyEndPatternLast": 1,
"endCaptures": {
"0": {
"name": "punctuation.definition.end.frontmatter"
}
},
"patterns": [
{
"include": "source.yaml"
"begin": "\\A(-{3,})(.*)$",
"while": "^(?! {,3}\\1-*[ \\t]*$|[ \\t]*\\.{3}$)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.begin.frontmatter"
},
"2": {
"name": "comment.frontmatter"
}
},
"contentName": "meta.embedded.block.frontmatter",
"patterns": [
{
"include": "source.yaml"
}
]
}
],
"end": "(^|\\G)-{3}|\\.{3}\\s*$"
]
},
"table": {
"name": "markup.table.markdown",
Expand Down

0 comments on commit 7c8a632

Please sign in to comment.