This extension calls qmlformat
command to automatically format your QML files in accordance with the QML Coding Conventions.
You must have the qmlformat
command installed on your development environment.
This utility was added to the Qt Quick module starting with Qt 5.15.
If desired, you can optionally configure some parameters:
{
// You can specify the path toward the "qmlformat" executable,
// if it's not available by default in your PATH.
"qmlFormat.command": "/usr/lib/qt6/bin/qmlformat",
// You can specify additional arguments that will be passed
// to the "qmlformat" command while formatting a file.
"qmlFormat.extraArguments": ["--normalize"]
}