Closed nyngwang closed 1 year ago
Not possible, what’s the point of this if I may ask?
To @ibhagwan:
[...], what’s the point of this if I may ask?
I recently like the idea of minimal UI before manually calling any functions. So I move fzf-lua to the center of my screen and disable the preview window. When I need to preview a hovered item, I will always call the two actions in sequence: toggle-preview
, toggle-fullscreen
. But this will cost two keypress. It will be good if I can just use one keymap to complete the task.
Or, is it possible achieve this in another format: by passing a function ()
as the value for the table, then calling each internal function in order?
before & after(pressing <F1><F2>
, so I have to remember that I need to press two keys):
I have a similar workflow in my neovim config to review git changes, I open git status, make it full screen and then make the tmux pane also fullscreen using <tmux prefix>-Z
, IMHO, this is better achieved using your own customization, I don’t plan on adding this functionality into fzf-lua as it adds unnecessary complexity into the bind logic.
My code if you wish to take a look:
@ibhagwan You're right, apologies that I complicated the problem. With your config, I came up with the following solution: (You might know how to improve it)
vim.keymap.set('t', '<F1>', function ()
if vim.bo.filetype == 'fzf' then
require('fzf-lua.win').toggle_preview()
require('fzf-lua.win').toggle_fullscreen()
end
end, { noremap = true, silent = true, nowait = true })
Thanks again for this beautiful plugin -- fzf-lua :) This issue can be safely closed now!
Great! will close :-)
Description
As title. Is it possible to achieve something like this? Or there is some existing way to achieve the same result (entering fullscreen and open the preview). Thanks in advance!