indent_style attribute finer configuration
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
Hello!
In this PR where many *_indent configuration options were merged into one.
https://github.com/rust-lang/rustfmt/pull/2147
However, it can still be useful to have a possibility to do a finer configuration. What do you think about having old options alongside with indent_style? indent_style will thus set default behaviour which can be redefined for specific cases in other options.
rustfmt.toml could look like this:
indent_style = "Visual"
indent_style_where = "Block"
Where default value for indent_style_* is indent_style.
I can make a PR if there is any interest.
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 reviewing the earlier rustfmt/pull/2147 change and the current configuration represented by rustfmt.toml. Define how indent_style should provide defaults for indent_style_* options and how specific cases override it, then verify the proposed configuration behavior in rustfmt.
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
- Mostly clear
- Newbie friendliness
- 30/100