Skip to content

Optional commas in map literals #364

Description

@dkick-cni

Community standards mentions optional commas in map literals

`;; [1] good
{:name "Bruce Wayne" :alter-ego "Batman"}

;; [2] good and arguably a bit more readable
{:name "Bruce Wayne"
:alter-ego "Batman"}

;; [3] good and arguably more compact
{:name "Bruce Wayne", :alter-ego "Batman"}`

As far as I can tell, zprint only supports commas yes, or commas no. Is there a way to configure it to never [1] but [2] or [3] depending on either: 1, space in the right margin; 2, it's been asked to respect newlines, and so will not add commas to [2] but would add them to [1] to turn [1] into [3]?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions