maxomatic458
maxomatic458
looks good so far. I think instead of defaulting to this https://github.com/ysthakur/reedline/blob/44e18841807ef914d302f57fc9cb9b2c151c099b/src/menu/ide_menu.rs#L516-L523 it might be better to just ignore the styling (so basically fully leave it up to the completer)....
> Do you mean decoupling value from how it's displaying, eg. adding something like display_value to Suggestion, while value is still what gets put on the command line on selection?...
@ysthakur maybe this could be implemented as a trait something like ```rs pub trait SuggestionStyler { fn style_selected(&self, suggestion: Suggestion, ...) -> String { ... } fn style_unselected(&self, suggestion: Suggestion,...
@ysthakur that approach would not need any more fields on the Suggestion itself all styling would be handled inside this trait that would potentially allow for more complex styling, without...
> Or it would mean inside the styler we have to recompute the matching indices, which sounds a bit unpleasant That was my idea (if you are concerned about the...
@ysthakur > Also, both the completer and the styler will need to be aware of how matching works. Ah now i see, yea in that case we would need to...
> > terminal_dims: Option > I noticed one of the examples above had this - what would it be used for? Yea not really sure what that could be used...
> Would this be used by the Styler trait to have more information for styling? @ysthakur that could be also be used outside of styling. Currently we have the helper...