dtolnay / dtolnay/prettyplease

Better macros 2.0 formatting

Open
#111 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
772
Forks
48
PR merge metrics
No merged PRs in 30d

Description

Currently, prettyplease formats them [like this](https://github.com/metallang/metal/blob/feat/generic-names/crates/metal-ast/src/syntax_kind.rs#L332-L373), with newlines (seemingly) only being printed when absolutely necessary for line width reasons. This causes frequent merge conflicts where a simple change such as

```diff
+ [TypeSpecifier] => { $crate::SyntaxKind::TYPE_SPECIFIER_NODE },
```

causes a diff like

https://github.com/metallang/metal/pull/145/files#diff-f849ceb9b46f819b3d784180a36767dc7a4aef2d1a4c31e5c8edd0c846e35945L386-R402

Ideally, prettyplease would format multi-arm macros 2.0 just like the normal/"old" macros.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.