gfanto/fzf-lsp.nvim

Proposal: New format for fzf items

mhanberg opened this issue · 2 comments

Hi!

Love the plugin. I prefer fzf over telescope, so it's great to have functionality like this for LSP. However, Telescope does have some UI niceties that I have included in a local patch.

I was wondering if you are interested in including the patch.

Changes

  • don't include the file path in window or let you fzf on it.

    I found the file path crowed the results, and sort of defeated the purpose of the window. I would just use normal :Files if i wanted to match on the file path.

  • organize the symbol and the "kind" into columns, truncating the symbol if it's too long.

  • colorize the "kind". this allows easier visual recognition of the type of symbol you are looking at

image

I am open to critique on any of my changes, or added config options to customize anything.

One other thing I am going to try and add is treesitter highlighting the symbols before they are fed to fzf. This would require creating an ansi highlighter using the neovim treesitter api, but shouldn't be too difficult.

Let me know what you think! Thanks

Hi,

I love your ideas! These would be some great additions!.
Changing the line format should be pretty easy, and i could probably do that this weekend.

Speaking of treesitter highlighting i not sure on how you wanna do it, but keep in mind that this plugin is just a wrapper over the fzf binary and it uses bat for the preview, if you want somethig more complex i suggest you (if you don't already now it) https://github.com/ibhagwan/fzf-lua.
The guy have done an incredible job, and if I remember correctly it just uses fzf just as fuzzy find engine everything else is made with the neovim api so it can use your theme highlighter etc.

Thanks!

I can get a PR up with my patch, and you can feel free to make any changes you'd like or just use it for inspiration.

With regard to treesitter, I meant to highlight the lines that are fed into fzf, not highlight the preview window.

But, I haven't figured that out yet, so not directly relevant to this issue.