linrongbin16 / fzfx.nvim

A Neovim fuzzy finder that updates on every keystroke.
https://linrongbin16.github.io/fzfx.nvim/
MIT License
114 stars 5 forks source link

Buffer previewer (?) affects WinOpts #603

Closed savchenko closed 3 months ago

savchenko commented 6 months ago

Running buffer selector using v5.1.6 creates the following window:

image

In the subsequent versions, it returns this:

image

Is this a bug or a change of spec?

linrongbin16 commented 6 months ago

Running buffer selector using v5.1.6 creates the following window:

image

In the subsequent versions, it returns this:

image

Is this a bug or a change of spec?

should be a bug, I will take a look

linrongbin16 commented 6 months ago

hi @savchenko,

please set let g:fzfx_disable_buffer_previewer=1 to disable the buffer previewer as a workaround.

I will fix this issue.

linrongbin16 commented 6 months ago

hi @savchenko ,

I refactored the popup window layout calculation in #609 , now I need a test case to confirm it can fix this issue.

Can I reproduce this issue with the buffers configuration you post here: https://github.com/linrongbin16/fzfx.nvim/wiki/Helpful-snippets#buffer-selector ?

savchenko commented 6 months ago

@linrongbin16 , Yes, I can reproduce it using that snippet and https://github.com/linrongbin16/fzfx.nvim/commit/c3b860f9e206dbc7a124dd08539fa6a33db64e78

linrongbin16 commented 5 months ago

hi @savchenko , thanks to your report & help, #609 has finally fixed this issue, please pull main branch and try again!

BTW, I renamed the wiki you editted to Advanced Configuration

linrongbin16 commented 5 months ago

hi @savchenko ,

I found the config you post here: https://github.com/linrongbin16/fzfx.nvim/wiki/Advanced-Configuration#buffer-selector, it looks very small when I am trying it.

Are you sure it's really working in this way?

savchenko commented 4 months ago

hi @linrongbin16,

I have checked with the latest commit (efb8813fab6997f80c99a078be2ed2481a5cab4d at the time of writing).

It seems like fzf_opts are ignored, for example, this:

fzf_opts = {
    '--info=hidden --padding=0 --header= --preview-window=hidden'
}

Results in a popup with preview enabled:

image

linrongbin16 commented 4 months ago

it could be a bug, because I did many hacks on fzf options, to make it compatible with nvim buffer previewer.

I will take a look at this issue.

linrongbin16 commented 3 months ago

Update:

I found the root cause, there're 2 things need to note:

  1. should set fzf options to lua list:

    fzf_opts = {
     '--info=hidden',
     '--padding=0',
     '--header=',
     '--preview-window=hidden'
    }

    This will help this plugin to correctly parse fzf options.

  2. The '--preview-window=hidden' option is however been ignored when starting FzfxBuffers command, I'm working on it.

linrongbin16 commented 3 months ago

hi @savchenko ,

The 2nd issue mentioned in above comments is fixed in #689 , please have a try!

savchenko commented 3 months ago

All works great now, thank you!