Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/delgan/qml-format
A VS Code extension to beautify QML files
https://github.com/delgan/qml-format
format formatter qml qml-formatter qt vscode vscode-extension
Last synced: about 1 month ago
JSON representation
A VS Code extension to beautify QML files
- Host: GitHub
- URL: https://github.com/delgan/qml-format
- Owner: Delgan
- License: mit
- Created: 2022-07-24T08:40:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-18T16:04:08.000Z (about 2 months ago)
- Last Synced: 2025-01-03T23:34:40.287Z (about 1 month ago)
- Topics: format, formatter, qml, qml-formatter, qt, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=delgan.qml-format
- Size: 398 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# QML Format
*A Visual Studio Code extension to beautify Qt QML files.*
[![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/delgan.qml-format)](https://marketplace.visualstudio.com/items?itemName=delgan.qml-format) [![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/Delgan/qml-format/tests.yml?branch=main)](https://github.com/Delgan/qml-format/actions/workflows/tests.yml?query=branch:main) [![License](https://img.shields.io/github/license/Delgan/qml-format)](https://github.com/Delgan/qml-format/blob/main/LICENSE)
## Features
This extension calls [`qmlformat`](https://doc-snapshots.qt.io/qt6-dev/qtquick-tools-and-utilities.html#qmlformat) command to automatically format your QML files in accordance with the [QML Coding Conventions](https://doc-snapshots.qt.io/qt6-dev/qml-codingconventions.html).
[![Formatting demo](assets/demo.gif)](https://raw.githubusercontent.com/Delgan/qml-format/main/assets/demo.gif)
## Requirements
You **must** have the `qmlformat` command installed on your development environment.
This utility was added to the [Qt Quick](https://doc-snapshots.qt.io/qt6-dev/qtquick-index.html) module starting with **Qt 5.15**.
## Settings
If desired, you can optionally configure some parameters:
```jsonc
{
// 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"]
}
```