fn print_sidebar_section( out: &mut Buffer, items: &[Item], id: &str, title: &str, filter: impl Fn(&Item) -> bool, mapper: impl Fn(&str) -> String)