Add a way to toggle inlay hints with modifiers (#25752)
This commit is contained in:
parent
2e98bc17cb
commit
e8ef36edcc
10 changed files with 101 additions and 9 deletions
|
@ -1288,6 +1288,7 @@ pub mod tests {
|
|||
show_parameter_hints: allowed_hint_kinds.contains(&Some(InlayHintKind::Parameter)),
|
||||
show_other_hints: allowed_hint_kinds.contains(&None),
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
let (_, editor, fake_server) = prepare_test_objects(cx, |fake_server, file_with_hints| {
|
||||
|
@ -1391,6 +1392,7 @@ pub mod tests {
|
|||
show_parameter_hints: true,
|
||||
show_other_hints: true,
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -1493,6 +1495,7 @@ pub mod tests {
|
|||
show_parameter_hints: true,
|
||||
show_other_hints: true,
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -1712,6 +1715,7 @@ pub mod tests {
|
|||
show_parameter_hints: allowed_hint_kinds.contains(&Some(InlayHintKind::Parameter)),
|
||||
show_other_hints: allowed_hint_kinds.contains(&None),
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -1871,6 +1875,7 @@ pub mod tests {
|
|||
.contains(&Some(InlayHintKind::Parameter)),
|
||||
show_other_hints: new_allowed_hint_kinds.contains(&None),
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
cx.executor().run_until_parked();
|
||||
|
@ -1913,6 +1918,7 @@ pub mod tests {
|
|||
.contains(&Some(InlayHintKind::Parameter)),
|
||||
show_other_hints: another_allowed_hint_kinds.contains(&None),
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
cx.executor().run_until_parked();
|
||||
|
@ -1967,6 +1973,7 @@ pub mod tests {
|
|||
.contains(&Some(InlayHintKind::Parameter)),
|
||||
show_other_hints: final_allowed_hint_kinds.contains(&None),
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
cx.executor().run_until_parked();
|
||||
|
@ -2038,6 +2045,7 @@ pub mod tests {
|
|||
show_parameter_hints: true,
|
||||
show_other_hints: true,
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -2169,6 +2177,7 @@ pub mod tests {
|
|||
show_parameter_hints: true,
|
||||
show_other_hints: true,
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -2467,6 +2476,7 @@ pub mod tests {
|
|||
show_parameter_hints: true,
|
||||
show_other_hints: true,
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -2811,6 +2821,7 @@ pub mod tests {
|
|||
show_parameter_hints: false,
|
||||
show_other_hints: false,
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -2992,6 +3003,7 @@ pub mod tests {
|
|||
show_parameter_hints: true,
|
||||
show_other_hints: true,
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
cx.executor().run_until_parked();
|
||||
|
@ -3023,6 +3035,7 @@ pub mod tests {
|
|||
show_parameter_hints: true,
|
||||
show_other_hints: true,
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -3114,6 +3127,7 @@ pub mod tests {
|
|||
show_parameter_hints: true,
|
||||
show_other_hints: true,
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -3187,6 +3201,7 @@ pub mod tests {
|
|||
show_parameter_hints: true,
|
||||
show_other_hints: true,
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
cx.executor().run_until_parked();
|
||||
|
@ -3246,6 +3261,7 @@ pub mod tests {
|
|||
show_parameter_hints: true,
|
||||
show_other_hints: true,
|
||||
show_background: false,
|
||||
toggle_on_modifiers_press: None,
|
||||
})
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue