Feature request: control maximum line length with `fn_params_layout = "Tall"`?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
It would be useful if there were some knobs to turn with fn_params_layout = "Tall"; e.g.
-
Can the maximum line length before vertical alignment is used be configured? If so, it seems like that's not documented in https://rust-lang.github.io/rustfmt/?version=master&search=#fn_params_layout.
-
Could this also be controlled based on the number of parameters the function receives? For example, I'd prefer "Compressed" formatting for functions taking 1 or 2 arguments, but "Vertical" alignment otherwise. This might be irrespective of how long the actual function signature is with those arguments.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the fn_params_layout documentation and its current behavior in rustfmt. Determine whether configurable line length and parameter-count-based layouts are supported or require a new design. Done would require an agreed configuration behavior, implementation scope, and corresponding documentation or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100