Skip to content

Commit 42d96e7

Browse files
authored
Add the qmlformat formatter (#449)
* Add the qmlformat formatter Resolves #380 * Don't support darwin * Remove the example It seems to fail in the CI for some reason.
1 parent 1b9b6f9 commit 42d96e7

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

README.md

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

224224
<!-- BEGIN mdsh -->
225-
`treefmt-nix` currently supports 121 formatters:
225+
`treefmt-nix` currently supports 122 formatters:
226226

227227
* [actionlint](programs/actionlint.nix)
228228
* [aiken](programs/aiken.nix)
@@ -312,6 +312,7 @@ functions.
312312
* [prettier](programs/prettier.nix)
313313
* [protolint](programs/protolint.nix)
314314
* [purs-tidy](programs/purs-tidy.nix)
315+
* [qmlformat](programs/qmlformat.nix)
315316
* [rstfmt](programs/rstfmt.nix)
316317
* [rubocop](programs/rubocop.nix)
317318
* [ruff-check](programs/ruff-check.nix)

programs/qmlformat.nix

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
pkgs,
3+
mkFormatterModule,
4+
...
5+
}:
6+
{
7+
meta = {
8+
maintainers = [ "rotmh" ];
9+
platforms = pkgs.lib.platforms.linux;
10+
skipExample = true;
11+
};
12+
13+
imports = [
14+
(mkFormatterModule {
15+
name = "qmlformat";
16+
mainProgram = "qmlformat";
17+
package = [
18+
"kdePackages"
19+
"qtdeclarative"
20+
];
21+
args = [ "-i" ];
22+
includes = [ "*.qml" ];
23+
})
24+
];
25+
}

0 commit comments

Comments
 (0)