lotabout / skim

Fuzzy Finder in rust!
MIT License
5.1k stars 183 forks source link

neovim 0.5 plugin support in lua #418

Open ibhagwan opened 3 years ago

ibhagwan commented 3 years ago

Not really an issue, I saw that you are maintaining skim.vim, based off of fzf.vim.

I recently wrote fzf-lua, as you can probably guess from the name it's an implementation of fzf.vim in pure lua, with many more features (icons, git indicators, native LSP support and more).

Yesterday I saw your project and due to my soft spot for any rust implementation of projects I love I decided to add support for skim (which is amazing btw), due to the great compatibility of the command line options it only took minor modifications to make it work and one slightly bigger modification to be able to use "interactive mode" for live grep (rg), which was utilizing the change:reload event in fzf.

If you'd like to try it out, follow the installation instructions on my repo, note that until @vijaymarupudi decides what to do with this PR you need to use my fork of nvim-fzf and just change the fzf_bin variable to sk instead.

In short, add the below plugins (using packer.nvim):

use { 'ibhagwan/fzf-lua',
  requires = {
    'vijaymarupudi/nvim-fzf',
    'kyazdani42/nvim-web-devicons' } -- optional for icons
}

or using vim-plug:

Plug 'ibhagwan/fzf-lua'
Plug 'vijaymarupudi/nvim-fzf'
Plug 'kyazdani42/nvim-web-devicons'

And setup the plugin with skim:

lua << EOF
require'fzf-lua'.setup({fzf_bin = 'sk'})
EOF

Here's a glimpse of fzf-lua working with skim (left side live grep, right side LSP diagnostics):

screenshot-1627013466

stevenroose commented 11 months ago

I just tried to use fzf-lua with skim and it doesn't work. Many of the winopts flags, even though skim documents having them, don't work with fzf-lua.

It would be amazing if someone well-versed in skim and neovim's lua extensions would look into how skim and neovim could work better together. Either by improving skim/fzf-lua interactions or having a skim-lua.