chore: Fix several style lints (#17488)
It's not comprehensive enough to start linting on `style` group, but hey, it's a start. Release Notes: - N/A
This commit is contained in:
parent
93249fc82b
commit
e6c1c51b37
361 changed files with 3530 additions and 3587 deletions
|
@ -249,24 +249,23 @@ impl SyntaxTreeView {
|
|||
}
|
||||
|
||||
let node = cursor.node();
|
||||
return row
|
||||
.child(if node.is_named() {
|
||||
Label::new(node.kind()).color(Color::Default)
|
||||
} else {
|
||||
Label::new(format!("\"{}\"", node.kind())).color(Color::Created)
|
||||
})
|
||||
.child(
|
||||
div()
|
||||
.child(Label::new(format_node_range(node)).color(Color::Muted))
|
||||
.pl_1(),
|
||||
)
|
||||
.text_bg(if selected {
|
||||
colors.element_selected
|
||||
} else {
|
||||
Hsla::default()
|
||||
})
|
||||
.pl(rems(depth as f32))
|
||||
.hover(|style| style.bg(colors.element_hover));
|
||||
row.child(if node.is_named() {
|
||||
Label::new(node.kind()).color(Color::Default)
|
||||
} else {
|
||||
Label::new(format!("\"{}\"", node.kind())).color(Color::Created)
|
||||
})
|
||||
.child(
|
||||
div()
|
||||
.child(Label::new(format_node_range(node)).color(Color::Muted))
|
||||
.pl_1(),
|
||||
)
|
||||
.text_bg(if selected {
|
||||
colors.element_selected
|
||||
} else {
|
||||
Hsla::default()
|
||||
})
|
||||
.pl(rems(depth as f32))
|
||||
.hover(|style| style.bg(colors.element_hover))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -406,6 +405,12 @@ impl Item for SyntaxTreeView {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for SyntaxTreeToolbarItemView {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl SyntaxTreeToolbarItemView {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue