1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00
Files
DankMaterialShell/CONTRIBUTING.md
bbedward 21867c842f modules cleanup and qmlfmt everywhere
- throw in 24H clock fix and app drawer fix too
2025-09-03 23:26:07 -04:00

936 B

Contributing

Contributions are welcome and encourages.

Formatting

The preferred tool for formatting files is qmlfmt (also available on aur as qmlfmt-git). It actually kinda sucks, but qmlformat doesn't work with null safe operators and ternarys and pragma statements and a bunch of other things that are supported.

We need some consistent style, so this at least gives the same formatter that Qt Creator uses.

You can configure it to format on save in vscode by configuring the "custom local formatters" extension then adding this to settings json.

  "customLocalFormatters.formatters": [
    {
      "command": "sh -c \"qmlfmt -t 4 -i 4 -b 250 | sed 's/pragma ComponentBehavior$/pragma ComponentBehavior: Bound/g'\"",
      "languages": ["qml"]
    }
  ],
  "[qml]": {
    "editor.defaultFormatter": "jkillian.custom-local-formatters",
    "editor.formatOnSave": true
  },