mirror of
https://github.com/vale981/apheleia
synced 2025-03-04 09:01:42 -05:00
Add indent level support for yq JSON, XML, and YAML (#259)
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
This commit is contained in:
parent
022cf17464
commit
3aa747856a
2 changed files with 8 additions and 3 deletions
|
@ -10,6 +10,7 @@ The format is based on [Keep a Changelog].
|
|||
settings ([#261]).
|
||||
* Indent level is now determined for `graphql-mode`, `html-mode`, `ruby-mode`,
|
||||
`ruby-ts-mode`, `svelte-mode`, and `yaml-mode` ([#258]).
|
||||
* Indent level support when using yq to format JSON, XML, and YAML ([#259]).
|
||||
|
||||
### Formatters
|
||||
* [`dprint`](https://dprint.dev) for various (depending on
|
||||
|
@ -34,6 +35,7 @@ The format is based on [Keep a Changelog].
|
|||
[#229]: https://github.com/radian-software/apheleia/pull/229
|
||||
[#257]: https://github.com/radian-software/apheleia/pull/257
|
||||
[#258]: https://github.com/radian-software/apheleia/pull/258
|
||||
[#259]: https://github.com/radian-software/apheleia/pull/259
|
||||
[#260]: https://github.com/radian-software/apheleia/pull/260
|
||||
[#261]: https://github.com/radian-software/apheleia/pull/261
|
||||
[#263]: https://github.com/radian-software/apheleia/pull/263
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue