Skip to content

[Feature Request] VSCode extension - formatting zmodel file not same style as Prisma VSCode extension format #1092

Closed
@MariusVB

Description

@MariusVB

Is your feature request related to a problem? Please describe.
It seems the format rules of the Zenstack extension are not the same as the Prisma extension. The Prisma extension makes field names, data types and attributes line up, whereas Zenstack extension moves them all as far left as possible. Everytime I save the zmodel file, I have to run Save without formatting...

Describe the solution you'd like
Follow the same rules as the Prisma schema formatter. Names, data types and attributes should line up within the same model.

Describe alternatives you've considered
Run Save without formatting each time and take care of the indentation yourself...

Additional context

Actual result of Zenstack zmodel format:
image

Expected result like Prisma format:
image

EDIT
The format could even be improved by also lining up field-level policies. E.g.:
image

It might result in very long lines, but perhaps a multi-line formatting rule could be made then?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions