Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
linrongbin16 opened this issue Jun 14, 2024 · 8 comments
Open

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

linrongbin16 opened this issue Jun 14, 2024 · 8 comments

Comments

@linrongbin16
Copy link
Owner

Related: #705.

@linrongbin16
Copy link
Owner Author

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
Copy link

damanis commented Jun 16, 2024

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

@damanis
Copy link

damanis commented Jun 16, 2024

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
Copy link
Owner Author

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
Copy link

damanis commented Jun 17, 2024

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

image

@linrongbin16
Copy link
Owner Author

linrongbin16 commented Jun 17, 2024

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
Copy link

damanis commented Jun 17, 2024

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
Copy link
Owner Author

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

I will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants