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

Error when calling References or Diagnostics command #8

Closed ner0-m closed 3 years ago

ner0-m commented 3 years ago

Hi,

Running the commands :References or :Diagnostics produces the following error:

path/to/bundle/fzf-lsp.nvim/lua/fzf_lsp.lua:260: attempt to concatenate a nil value

Calling e.g lua vim.lsp.buf.references() yields in a result.

If you need any more info, let me know, would be great if this can be fixed.

gfanto commented 3 years ago

Uhm sorry about that i probably made some naive assumption in the preview configuration code, can you please give me the value of your fzf_lsp_preview_window variable? To do that you can just type: :echo g:fzf_lsp_preview_window.

ner0-m commented 3 years ago

It says right:60%

gfanto commented 3 years ago

Ohh ok i've probably assumed that the string version of that settings was deprecated, but it's probably still supported in fzf.vim for backward compatibility. So i think that the fastest solution is to change your settings from something like let g:fzf_lsp_preview_window = 'right:60%' to let g:fzf_lsp_preview_window = ['right:60%'], or if you want the toggle command something like let g:fzf_lsp_preview_window = ['right:60%', 'ctrl-/']. If you don't want to change that settings, as soon i have 5 minutes of free time today, i will keep the compatibilty with the string version of the setting.

ner0-m commented 3 years ago

That fixed it, perfect thanks! I changed it, for me a hint in the readme would be perfectly fine.