mirror of
https://github.com/RGBCube/alejandra
synced 2025-08-01 21:17:45 +00:00
feat: indent let bindings
This commit is contained in:
parent
7cd1bd2763
commit
4a23885541
2 changed files with 28 additions and 21 deletions
|
@ -81,6 +81,12 @@ pub fn rule(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps.push_back(crate::builder::Step::Format(child.element));
|
steps.push_back(crate::builder::Step::Format(child.element));
|
||||||
|
match layout {
|
||||||
|
crate::config::Layout::Tall => {
|
||||||
|
steps.push_back(crate::builder::Step::Indent);
|
||||||
|
}
|
||||||
|
crate::config::Layout::Wide => {}
|
||||||
|
}
|
||||||
|
|
||||||
// /**/
|
// /**/
|
||||||
children.drain_comments(|text| {
|
children.drain_comments(|text| {
|
||||||
|
@ -96,6 +102,7 @@ pub fn rule(
|
||||||
steps.push_back(crate::builder::Step::NewLine);
|
steps.push_back(crate::builder::Step::NewLine);
|
||||||
steps.push_back(crate::builder::Step::Pad);
|
steps.push_back(crate::builder::Step::Pad);
|
||||||
steps.push_back(crate::builder::Step::FormatWider(child.element));
|
steps.push_back(crate::builder::Step::FormatWider(child.element));
|
||||||
|
steps.push_back(crate::builder::Step::Dedent);
|
||||||
}
|
}
|
||||||
crate::config::Layout::Wide => {
|
crate::config::Layout::Wide => {
|
||||||
steps.push_back(crate::builder::Step::Whitespace);
|
steps.push_back(crate::builder::Step::Whitespace);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue