Support configuring user gutter width#223
Conversation
ulyssa
left a comment
There was a problem hiding this comment.
This looks good! I first chose 30 as the width before adding support for display names, so it's definitely a little wide with the other configurations.
There are a couple clippy warnings. I've commented on them and ways that I think you can improve on what it's recommending.
| open_command: self.open_command, | ||
| notifications: self.notifications.unwrap_or_default(), | ||
| image_preview: self.image_preview.map(ImagePreview::values), | ||
| user_gutter_width: self.user_gutter_width.unwrap_or(30 as usize), |
There was a problem hiding this comment.
cargo clippy suggests 30_usize here, but I'm pretty sure you should just be able to do 30 and inference will figure it out.
There was a problem hiding this comment.
Had problems with 30 getting inferred as u16 but I don't have that problem anymore. Maybe the LSP that was not working properly. Works as you suggested for me now.
Co-authored-by: Ulyssa <git@ulyssa.dev>
309e7c5 to
a0d141a
Compare
|
Thank you for the quick review and suggestions. Hopefully everything looks good now. |
I found the user gutter too wide by default, especially when using localpart or display name for usernames so i made it configurable. Seems to work fine but I'm not a rustacean so there is perhaps a more idiomatic way to do this.