diff --git a/syntax/syntax-doctex.json b/syntax/syntax-doctex.json index 2360bb1c3..7c3ceac79 100644 --- a/syntax/syntax-doctex.json +++ b/syntax/syntax-doctex.json @@ -8,6 +8,28 @@ ["(", ")"] ], "autoClosingPairs": [ + ["\\begin{", ""], + ["\\left(", ""], + ["\\left[", ""], + ["\\left{", ""], + ["\\bigl(", ""], + ["\\bigl[", ""], + ["\\bigl{", ""], + ["\\Bigl(", ""], + ["\\Bigl[", ""], + ["\\Bigl{", ""], + ["\\biggl(", ""], + ["\\biggl[", ""], + ["\\biggl{", ""], + ["\\Biggl(", ""], + ["\\Biggl[", ""], + ["\\Biggl{", ""], + ["\\(", ""], + ["\\[", ""], + ["\\{", ""], + ["@(", ""], + ["@[", ""], + ["@{", ""], ["{", "}"], ["[", "]"], ["(", ")"], diff --git a/syntax/syntax-expl3.json b/syntax/syntax-expl3.json index f8a7b54bf..6751e7305 100644 --- a/syntax/syntax-expl3.json +++ b/syntax/syntax-expl3.json @@ -12,6 +12,28 @@ ["\\left<", "\\right>"] ], "autoClosingPairs": [ + ["\\begin{", ""], + ["\\left(", ""], + ["\\left[", ""], + ["\\left{", ""], + ["\\bigl(", ""], + ["\\bigl[", ""], + ["\\bigl{", ""], + ["\\Bigl(", ""], + ["\\Bigl[", ""], + ["\\Bigl{", ""], + ["\\biggl(", ""], + ["\\biggl[", ""], + ["\\biggl{", ""], + ["\\Biggl(", ""], + ["\\Biggl[", ""], + ["\\Biggl{", ""], + ["\\(", ""], + ["\\[", ""], + ["\\{", ""], + ["@(", ""], + ["@[", ""], + ["@{", ""], ["{", "}"], ["[", "]"], ["(", ")"], diff --git a/syntax/syntax-weave.json b/syntax/syntax-weave.json index 59de33cc2..c4c78b339 100644 --- a/syntax/syntax-weave.json +++ b/syntax/syntax-weave.json @@ -16,6 +16,28 @@ ["\\left<", "\\right>"] ], "autoClosingPairs": [ + ["\\begin{", ""], + ["\\left(", ""], + ["\\left[", ""], + ["\\left{", ""], + ["\\bigl(", ""], + ["\\bigl[", ""], + ["\\bigl{", ""], + ["\\Bigl(", ""], + ["\\Bigl[", ""], + ["\\Bigl{", ""], + ["\\biggl(", ""], + ["\\biggl[", ""], + ["\\biggl{", ""], + ["\\Biggl(", ""], + ["\\Biggl[", ""], + ["\\Biggl{", ""], + ["\\(", ""], + ["\\[", ""], + ["\\{", ""], + ["@(", ""], + ["@[", ""], + ["@{", ""], ["{", "}"], ["[", "]"], ["(", ")"], @@ -31,8 +53,8 @@ ["$", "$"] ], "indentationRules": { - "increaseIndentPattern": "(\\\\begin{(?!document))", - "decreaseIndentPattern": "(\\\\end{(?!document))" + "increaseIndentPattern": "\\\\begin{(?!document)([^}]*)}(?!.*\\\\end{\\1})", + "decreaseIndentPattern": "^\\s*\\\\end{(?!document)" }, "folding": { "markers": {