Option for padding in winopts #2084
Replies: 3 comments
-
Due to legacy the name doesn’t necessarily imply, but Lines 1035 to 1040 in 758173f If this has issues we can tackle these as I’m not sure how many users ever used split as a function, it’s mostly used as a vim command, e.g. |
Beta Was this translation helpful? Give feedback.
-
I just realized, if I'm not mistaken, that the I got the idea from this issue: #793 {
'<leader>ff',
function()
require('fzf-lua').files(function
-- logic to get the desired width or height goes here
-- return winopts = { my desired values }
)
end,
desc = '[f]ind [f]iles',
}, @ibhagwan let me know if that makes sense. |
Beta Was this translation helpful? Give feedback.
-
@carloscalla, correct. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, in very rare occasions I have to deal with little room for my terminal in my display. Recently I started using fixed values for
winopts
propertiesheight
andwidth
instead of decimal (percentages) so I would have a more consistent experience. But I noticed on small sizes the width take up the full space and on those cases I'd prefer to have some padding.I noticed that the are
max_width
andmax_height
variables used in the code here:fzf-lua/lua/fzf-lua/win.lua
Line 470 in 758173f
Both variable use
- 2
at the end accounting for the borders or window frames I assume. I was wondering if this padding could be configurable via an option.When using percentages in
width
andheight
the dimensions can differ a lot from one display to another, from one window size to another. When using fixed values sometimes it can be presented as full screen if the window is small enough. The ideal solution would be to have like a css style kind of awidth
,max_width
andmin_width
then also the same 3 for height but I understand that it would add a lot options for something that probably doesn't need that much granularity. So with the current state I see this- 2
could be easily configurable as apadding
option, could be 1 for all or a pair ofvertical_padding
(orpadding_y
) to be used formax_height
andhorizontal_padding
(orpadding_x
) to be used formax_width
.I would very much appreciate your feedback.
Beta Was this translation helpful? Give feedback.
All reactions