diff options
| author | Ville Skyttä <ville.skytta@iki.fi> | 2023-12-15 04:53:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-14 18:53:39 -0800 |
| commit | 3aa747856a53d1108c4009b47e77b48d9f290694 (patch) | |
| tree | 6e3394d8cf282b711472096137aefc2beaf59b6f /apheleia-formatters.el | |
| parent | 022cf174649a273133ca5aa868661abf8b517ef6 (diff) | |
Add indent level support for yq JSON, XML, and YAML (#259)
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
Diffstat (limited to 'apheleia-formatters.el')
| -rw-r--r-- | apheleia-formatters.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apheleia-formatters.el b/apheleia-formatters.el index 42fa485..abdb009 100644 --- a/apheleia-formatters.el +++ b/apheleia-formatters.el @@ -187,15 +187,18 @@ (yq-csv . ("yq" "--prettyPrint" "--no-colors" "--input-format" "csv" "--output-format" "csv")) (yq-json . ("yq" "--prettyPrint" "--no-colors" - "--input-format" "json" "--output-format" "json")) + "--input-format" "json" "--output-format" "json" + (apheleia-formatters-indent nil "--indent"))) (yq-properties . ("yq" "--prettyPrint" "--no-colors" "--input-format" "props" "--output-format" "props")) (yq-tsv . ("yq" "--prettyPrint" "--no-colors" "--input-format" "tsv" "--output-format" "tsv")) (yq-xml . ("yq" "--prettyPrint" "--no-colors" - "--input-format" "xml" "--output-format" "xml")) + "--input-format" "xml" "--output-format" "xml" + (apheleia-formatters-indent nil "--indent"))) (yq-yaml . ("yq" "--prettyPrint" "--no-colors" "--no-doc" - "--input-format" "yaml" "--output-format" "yaml"))) + "--input-format" "yaml" "--output-format" "yaml" + (apheleia-formatters-indent nil "--indent")))) "Alist of code formatting commands. The keys may be any symbols you want, and the values are shell commands, lists of strings and symbols, or a function symbol. |
