Skip to content

Commit 7abcb41

Browse files
fjijzimbatm
andauthored
Add Hujsonfmt formatter (#367)
* Add hujsonfmt formatter * Update options -> args * Update hujsonfmt examples, README, maintainer --------- Co-authored-by: Jonas Chevalier <[email protected]>
1 parent 2105d68 commit 7abcb41

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ functions.
221221
<!-- `> bash ./supported-programs.sh` -->
222222

223223
<!-- BEGIN mdsh -->
224-
`treefmt-nix` currently supports 110 formatters:
224+
`treefmt-nix` currently supports 111 formatters:
225225

226226
* [actionlint](programs/actionlint.nix)
227227
* [alejandra](programs/alejandra.nix)
@@ -267,6 +267,7 @@ functions.
267267
* [google-java-format](programs/google-java-format.nix)
268268
* [hclfmt](programs/hclfmt.nix)
269269
* [hlint](programs/hlint.nix)
270+
* [hujsonfmt](programs/hujsonfmt.nix)
270271
* [isort](programs/isort.nix)
271272
* [jsonfmt](programs/jsonfmt.nix)
272273
* [jsonnet-lint](programs/jsonnet-lint.nix)

examples/formatter-hujsonfmt.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Example generated by ../examples.sh
2+
[formatter.hujsonfmt]
3+
command = "hujsonfmt"
4+
excludes = []
5+
includes = ["*.hujson"]
6+
options = ["-w"]

programs/hujsonfmt.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{ mkFormatterModule, ... }:
2+
{
3+
meta.maintainers = [ "fjij" ];
4+
5+
imports = [
6+
(mkFormatterModule {
7+
name = "hujsonfmt";
8+
args = [ "-w" ];
9+
includes = [ "*.hujson" ];
10+
})
11+
];
12+
}

0 commit comments

Comments
 (0)