A pre-commit hook that uses pylspclient to ask the [LemMinX][lemminx] XML language server to format your files. This is the same formatter that is used in the RedHat XML extension for VS Code.
- repo: https://github.com/lalten/lemminx-pre-commit-hook
rev: v1.0.0
hooks:
- id: lemminx-format
The default formatting options are documented in https://github.com/eclipse/lemminx/blob/main/docs/Configuration.md#formatting
You can pass args: [--settings, "settings.json"]
to the hook to tune this.