-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Milestone
Description
Feature request
Small heuristics has a mix of formatting cases that I like and dislike. Unfortunately, I can't have the mix of formatting options I want since it's an all or nothing sort of situation with use_small_heuristics
. This issue is a feature request to separate out those formatting options into distinct options.
For backwards compatibility, I imagine it would be reasonable to annotate them as "overridden if use_small_heuristics
is not 'off'"
Example situation
It's a small heuristic feature to format structural enums on the same line:
match message {
InputMessage::CloseRequested => is_active = false,
InputMessage::KeyPressed(key) => match key {
KeyboardButton::Escape => is_active = false,
_ => {}
},
+ InputMessage::CursorPressed { .. } => {
- InputMessage::CursorPressed {
- ..
- } => {
// Code
}
+ InputMessage::CursorMoved { pos, .. } => {
- InputMessage::CursorMoved {
- pos,
- ..
- } => {
// Code
}
_ => {}
}
But if I disagree with some of the other small heuristics, I can't have this formatting option at all if I chose to set the configuration option to "off"
.
Metadata
Metadata
Assignees
Labels
No labels