Skip to content

Default formatting for define-foo forms #91

@jackfirth

Description

@jackfirth

There's a lot of macros in my projects that fmt doesn't know how to format. But rather than developing some protocol for my macros to expose formatting instructions to fmt, it would be plenty fine for my purposes if fmt just made some assumptions based on the name of the macro. Specifically, I'd like any form whose name starts with define- and which fmt doesn't already understand to be formatted pretty much the same as define, plus support for keyword options with one argument after them. So this:

(define-refactoring-rule foo-rule #:description "does the foo thing" #:literals [foo] (foo a b) (foo b a))  

Can be assumed to be formattable like this:

(define-refactoring-rule foo-rule
  #:description "does the foo thing"
  #:literals [foo]
  (foo a b)
  (foo b a))

Almost all of my define-foo macros fit this pattern, and the ones that don't I'm willing to tweak to make them fit it.

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