diff --git a/README.md b/README.md index 8982bd4..1a6f881 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,7 @@ functions. -`treefmt-nix` currently supports 111 formatters: +`treefmt-nix` currently supports 112 formatters: * [actionlint](programs/actionlint.nix) * [alejandra](programs/alejandra.nix) @@ -304,6 +304,7 @@ functions. * [prettier](programs/prettier.nix) * [protolint](programs/protolint.nix) * [purs-tidy](programs/purs-tidy.nix) +* [qmlformat](programs/qmlformat.nix) * [rstfmt](programs/rstfmt.nix) * [rubocop](programs/rubocop.nix) * [ruff-check](programs/ruff-check.nix) diff --git a/examples/formatter-qmlformat.toml b/examples/formatter-qmlformat.toml new file mode 100644 index 0000000..b288c0e --- /dev/null +++ b/examples/formatter-qmlformat.toml @@ -0,0 +1,5 @@ +[formatter.qmlformat] +command = "qmlformat" +excludes = [] +includes = ["*.qml"] +options = [] diff --git a/programs/qmlformat.nix b/programs/qmlformat.nix new file mode 100644 index 0000000..de5822e --- /dev/null +++ b/programs/qmlformat.nix @@ -0,0 +1,27 @@ +{ + mkFormatterModule, + ... +}: +{ + meta.maintainers = [ + "fvrings" + ]; + + imports = [ + (mkFormatterModule { + name = "qmlformat"; + mainProgram = "qmlformat"; + package = [ + "kdePackages" + "qtdeclarative" + ]; + args = [ + "-i" + ]; + includes = [ + "*.qml" + ]; + }) + ]; + +}