Closed loyd closed 2 months ago
Ty for the PR @loyd, I answered your Q in the review and a minor comment.
Did you check the preview of the lua function callback works without show_detsil? I’m thinking perhaps we can have a more flexible approach to the issue reordering the entries with --with-nth
?
We can set --delimiter=|
, place the description last (with no substring limitation) and then use --with-nth=1,2,4,3
for a “show_detail” entry and --with-nth=1,2,4
without (the 3rd field being the details).
Ty for the PR @loyd, I answered your Q in the review and a minor comment.
Thanks for the fast review. Fixed.
Did you check the preview of the lua function callback works without show_detsil?
Yep, of course, it looks as previously, but without an extra three spaces in the description
column.
We can set --delimiter=|, place the description last (with no substring limitation) and then use --with-nth=1,2,4,3 for a “show_detail” entry and --with-nth=1,2,4 without (the 3rd field being the details).
That would be nice. However, it means columns cannot include |
(unlikely, but possible).
That would be nice. However, it means columns cannot include | (unlikely, but possible).
you’re right, perhaps we can add utils.nbsp .. |
as the column separator and use utils.nbsp as delimiter?
use --with-nth=1,2,4,3 for a “show_detail” and --with-nth=1,2,4 without
The column shouldn't be limited, but I doubt limiting detail
is a good idea for users without good descriptions.
Thus, details should be limited (and with %-33s
) if show_details=true
and shouldn't be otherwise. That means it's not only about ordering, and --with-nth
is not enough. So, I'm not sure it's significant improvements in code (I've tried it).
Maybe calculate the real width of columns?
use --with-nth=1,2,4,3 for a “show_detail” and --with-nth=1,2,4 without
The column shouldn't be limited, but I doubt limiting
detail
is a good idea for users without good descriptions.Thus, details should be limited (and with
%-33s
) ifshow_details=true
and shouldn't be otherwise. That means it's not only about ordering, and--with-nth
is not enough. So, I'm not sure it's significant improvements in code (I've tried it).Maybe calculate the real width of columns?
Maybe I’m overthinking this, show_detail
option the way you did it should be perfect :)
And ty so much for the contribution @loyd :)
Hi, thanks for this package!
I'm migrating from the telescope (because of slowness on large codebases), and I noticed that the keymaps picker is too restrictive, which is not very useful for those who provide detailed descriptions for all bindings:
This PR introduces the
show_details
option, which (iffalse
) disables thedetail
column completely and shows this info only ifdescription
is empty.By default,
show_details = true
, thus it doesn't affect existing users.Result: