From 19606d24e0d7905e91dc385dfe8986b33a7f2ce5 Mon Sep 17 00:00:00 2001 From: Anton Mosich Date: Mon, 9 Jan 2023 12:29:46 +0100 Subject: [PATCH] Add latexindent config and update hooks --- .latexindent.yaml | 15 +++++++++++++++ .pre-commit-config.yaml | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .latexindent.yaml diff --git a/.latexindent.yaml b/.latexindent.yaml new file mode 100644 index 0000000..cae3f82 --- /dev/null +++ b/.latexindent.yaml @@ -0,0 +1,15 @@ +onlyOneBackup: 1 +indentPreamble: 1 + +modifyLineBreaks: + preserveBlankLines: 1 + condenseMultipleBlankLinesInto: 1 + textWrapOptions: + columns: 80 + multipleSpacesToSingle: 1 + environments: + DBSFinishesWithLineBreak: 1 + BeginStartsOnOwnLine: 1 + BodyStartsOnOwnLine: 1 + EndStartsOnOwnLine: 1 + EndFinishesWithLineBreak: 1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7d8d0a..ed32adc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,7 @@ repos: - id: check-yaml - id: check-added-large-files - repo: https://github.com/cmhughes/latexindent.pl - rev: V3.19.1 + rev: V3.20.1 hooks: - id: latexindent + args: ["-s", "-l", "--overwriteIfDifferent", "-m"]