Skip to content

Commit

Permalink
Update syntax files for weave, dtx, LaTeX3
Browse files Browse the repository at this point in the history
It is related to
  -  Autocomplete big paren commands PR #2397
  - Fix #2061 indentation with begin/end on the same line.
  • Loading branch information
jlelong committed Nov 27, 2020
1 parent 96db7bf commit 8e7f1da
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
22 changes: 22 additions & 0 deletions syntax/syntax-doctex.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@
["(", ")"]
],
"autoClosingPairs": [
["\\begin{", ""],
["\\left(", ""],
["\\left[", ""],
["\\left{", ""],
["\\bigl(", ""],
["\\bigl[", ""],
["\\bigl{", ""],
["\\Bigl(", ""],
["\\Bigl[", ""],
["\\Bigl{", ""],
["\\biggl(", ""],
["\\biggl[", ""],
["\\biggl{", ""],
["\\Biggl(", ""],
["\\Biggl[", ""],
["\\Biggl{", ""],
["\\(", ""],
["\\[", ""],
["\\{", ""],
["@(", ""],
["@[", ""],
["@{", ""],
["{", "}"],
["[", "]"],
["(", ")"],
Expand Down
22 changes: 22 additions & 0 deletions syntax/syntax-expl3.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@
["\\left<", "\\right>"]
],
"autoClosingPairs": [
["\\begin{", ""],
["\\left(", ""],
["\\left[", ""],
["\\left{", ""],
["\\bigl(", ""],
["\\bigl[", ""],
["\\bigl{", ""],
["\\Bigl(", ""],
["\\Bigl[", ""],
["\\Bigl{", ""],
["\\biggl(", ""],
["\\biggl[", ""],
["\\biggl{", ""],
["\\Biggl(", ""],
["\\Biggl[", ""],
["\\Biggl{", ""],
["\\(", ""],
["\\[", ""],
["\\{", ""],
["@(", ""],
["@[", ""],
["@{", ""],
["{", "}"],
["[", "]"],
["(", ")"],
Expand Down
26 changes: 24 additions & 2 deletions syntax/syntax-weave.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,28 @@
["\\left<", "\\right>"]
],
"autoClosingPairs": [
["\\begin{", ""],
["\\left(", ""],
["\\left[", ""],
["\\left{", ""],
["\\bigl(", ""],
["\\bigl[", ""],
["\\bigl{", ""],
["\\Bigl(", ""],
["\\Bigl[", ""],
["\\Bigl{", ""],
["\\biggl(", ""],
["\\biggl[", ""],
["\\biggl{", ""],
["\\Biggl(", ""],
["\\Biggl[", ""],
["\\Biggl{", ""],
["\\(", ""],
["\\[", ""],
["\\{", ""],
["@(", ""],
["@[", ""],
["@{", ""],
["{", "}"],
["[", "]"],
["(", ")"],
Expand All @@ -31,8 +53,8 @@
["$", "$"]
],
"indentationRules": {
"increaseIndentPattern": "(\\\\begin{(?!document))",
"decreaseIndentPattern": "(\\\\end{(?!document))"
"increaseIndentPattern": "\\\\begin{(?!document)([^}]*)}(?!.*\\\\end{\\1})",
"decreaseIndentPattern": "^\\s*\\\\end{(?!document)"
},
"folding": {
"markers": {
Expand Down

0 comments on commit 8e7f1da

Please sign in to comment.