gfanto / fzf-lsp.nvim

Enable the power of fzf fuzzy search for the neovim built in lsp
MIT License
223 stars 11 forks source link

References does not preview line with reference #35

Open swtch1 opened 1 year ago

swtch1 commented 1 year ago

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

gfanto commented 1 year ago

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?

swtch1 commented 1 year ago

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

swtch1 commented 1 year ago

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.

gfanto commented 1 year ago

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?

swtch1 commented 1 year ago

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

I'm on the latest MacOS.