ojroques / nvim-lspfuzzy

A Neovim plugin to make the LSP client use FZF
BSD 2-Clause "Simplified" License
316 stars 11 forks source link

Automatically load g:fzf_action if set #2

Closed jaywonchung closed 3 years ago

jaywonchung commented 3 years ago

Hi!

I use FZF on nvim with the g:fzf_action variable set:

let g:fzf_action = 
  \ { 'ctrl-g': 'tab split',
  \   'ctrl-s': 'split',
  \   'ctrl-v': 'vsplit' }

I wanted this to automatically load when I call require'lspfuzzy'.setup{}. That's what this PR does.

This is my first time coding in Lua. I hope things look fine.

ojroques commented 3 years ago

Hello! I was not aware that such option existed. I'll gladly add this feature. I've allowed myself to make some changes on top of yours mainly to clarify how FZF commands are chosen in the README and to clean up the code. Hope you don't mind. Thanks for the PR!

jaywonchung commented 3 years ago

Great! I wrote a separate function since we might have to load more from existing FZF options, but I guess this suffices for now. I love how you changed the README. Thanks!

ojroques commented 3 years ago

I see that's actually a nice idea. As soon as another FZF option is needed for the plugin I'll add it again.