fzf-lsp.nvim icon indicating copy to clipboard operation
fzf-lsp.nvim copied to clipboard

References does not preview line with reference

Open swtch1 opened this issue 1 year ago • 5 comments

What did you do?

Selected a symbol and called :References.

What did you expect to happen?

For fzf to display the references with a full preview of the code on the right.

What actually happened?

The preview is shown but the target line is always blank.

image

swtch1 avatar Apr 14 '23 18:04 swtch1

Installing bat should immediately fix your problem, but anyway by default it should also work with cat, at least in my system does. If you take the script bin/preview.sh an you call it like:

preview.sh <filepath>:<row>

does the specified row highlight?

gfanto avatar Apr 14 '23 19:04 gfanto

You are correct, it works using bat.. and I get better colors. Thanks.

swtch1 avatar Apr 14 '23 20:04 swtch1

After installing bat the line highlights correctly. I ripped out the lines that check for bat since I have it now and I get the same view as I did in fzf before with no text (save the 0 line number) on the target line.

swtch1 avatar Apr 14 '23 20:04 swtch1

When you say you ripped out the line that check for bat, do you mean you have forced the script to use cat? If so, can i ask you which os are you using?

gfanto avatar Apr 15 '23 17:04 gfanto

Yes, I forced it to use cat since I already had bat installed at that point.

I'm on the latest MacOS.

swtch1 avatar Apr 17 '23 14:04 swtch1