linrongbin16 / fzfx.nvim

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

Bug: cannot overwrite default 'fzf_opts' and 'win_opts' #710

Open linrongbin16 opened 2 weeks ago

linrongbin16 commented 2 weeks ago

Related: https://github.com/linrongbin16/fzfx.nvim/discussions/705.

linrongbin16 commented 2 weeks ago

I use the following code to change window split to horizontal. It worked before but in last versions using it causes problem: it is impossible to use -- to specify additional rg arguments. What is not correct in this configuration code?

 local fzfx = require("fzfx")

 fzfx.setup({
   live_grep = {
       fzf_opts = {
         { "--prompt",         "Buffers > " },
         { "--delimiter",      ":" },
         { "--preview-window", "top,50%,+{2}-/2" },
       },
       win_opts = {
         height = 50,
         width = 0.9,
         row = -2,
       },
   },
 })

hi @damanis, I tried your config in latest main branch, cannot reproduce this issue.

Could you try again?

damanis commented 2 weeks ago

@linrongbin16 Checked for 3d2152c9 — seems, work properly.

damanis commented 2 weeks ago

In output some some lines are shown with proper path to the file with found pattern, while other lines show a path partially or a file name are invisible at all. Is it internal algorithm or FZFX provide some flag to determine how truncate files names in output? image

linrongbin16 commented 2 weeks ago

In output some some lines are shown with proper path to the file with found pattern, while other lines show a path partially or a file name are invisible at all. Is it internal algorithm or FZFX provide some flag to determine how truncate files names in output? image

This is not happened to me, is there a simple repo that could reproduce this issue?

damanis commented 2 weeks ago

Clone NodeJS tree, then cd node, run neovim and in Fzfx LiveGrep enter test — t js.

image

linrongbin16 commented 2 weeks ago

Clone NodeJS tree, then cd node, run neovim and in Fzfx LiveGrep enter test — t js.

image

The .. at the beginning of the lines in left side, seems are generated by rg command, or auto-trimmed by fzf command.

Are you sure this is different from previous version of fzfx? I didn't change this behavior.

damanis commented 2 weeks ago

I think, in previous versions it was same. rg in bash always shows proper paths and there is no problem in fzf-lua plugin. In config I changed only preview options.

linrongbin16 commented 2 weeks ago

It maybe trimmed by fzf command, maybe there's some option to control it.

I will take a look.