Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong formatting incase of properties #25

Open
AnushaPulichintha opened this issue Oct 31, 2022 · 7 comments
Open

wrong formatting incase of properties #25

AnushaPulichintha opened this issue Oct 31, 2022 · 7 comments

Comments

@AnushaPulichintha
Copy link

AnushaPulichintha commented Oct 31, 2022

Hello,
Here is the simple qml item with property

import QtQuick
import QtQuick.Controls
Dialog {
    title: qsTr("About")
    property string tem_title: ""
    Label {
        text: "Lorem ipsum..."
    }
}

After formatting

import QtQuick
import QtQuick.Controls
Dialog {
    title: qsTr("About")
    property string tem_title: "";
        Label {
            text: "Lorem ipsum..."
        }
    }

is there any way to turn off the formatting for this single file ?
Thank you !!

@klaus-zaeper-horsch
Copy link

klaus-zaeper-horsch commented Nov 4, 2022

I've the same problem. Every property-entry increases the indent:

ScrollView {
    id: scroller
    property color borderColor: "steelblue"
        property int borderWidth: 5

            ListView {
                model: 20
                delegate: ItemDelegate {
                    text: "Item " + index

                    required property int index
                }
            }
        }

@walkthetalk
Copy link

same problem!

1 similar comment
@centercao
Copy link

same problem!

@WilhelmHagemeister
Copy link

same problem: but only observed when the property keyword is followed by the alias keyword

@hiroi-sora
Copy link

same problem +1

@NoelCav
Copy link

NoelCav commented May 20, 2023

This issue was created in the last couple updates. Rolling back to version 1.3.0 solved this issue.

To roll back, download the qml-formatter-1.3.0.vsix file found in the /extensions/ folder. Then use Shift + Alt + P to open the command pallet and find "Extensions: Install by Vsix..." and select the file.

@5a9awneh
Copy link

5a9awneh commented Jun 7, 2023

Same thing here, i hope there's a fix soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants