-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial support for fzy lua #599
Conversation
I've added a single export point to Eg local fzy = dofile('.../path/to/fzy-lua-native/lua/init.lua')
if fzy.has_match(...) then
...
end I use Note that both the original and native implementation expose a One more thing, I was playing with improvements and have added a For including the package, I'd either copy-paste everything or include as a git submodule. I prefer copy-paste to avoid complexifying the install process of vim-clap. Last thing, fzy-lua-native includes pre-compiled binaries for linux (x64 and arm), macOS (x64) and windows (x64), so it should be good for most users, but we might want to add a build step in |
@romgrk you can break however is best. 😁 I have your thing as submodule, so it's locked to a particular version. I can upgrade and fix differences as you go. |
@romgrk I have added the Lua support for Vim too. I'll leave the fzy-lua-native integration in the feature PR :(. I prefer to use it as a submodule as multiple files including the various prebuilt |
👍 TBH fzy-lua-native isn't super useful for clap because there is already the rust backend for the heavy-lifting |
I might be just too greedy :) |
this is really awesome! show current filter impl in lightline plugin: function! ClapFilterImplStatusLine() abort
let cur_impl = clap#filter#current_impl()
return 'Clap: ' . get({
\ 'Lua': luaeval("require'nvim-web-devicons'.get_icon('', 'lua')"),
\ 'Python': luaeval("require'nvim-web-devicons'.get_icon('', 'py')"),
\ 'VimL': luaeval("require'nvim-web-devicons'.get_icon('', 'vim')"),
\}, cur_impl)
endfunction |
Close #565
Thanks to https://github.com/swarn/fzy-lua, the basic fzy Lua support in clap is much easier. The next step might be adding a user-friendly way to also support your https://github.com/romgrk/fzy-lua-native @romgrk . Let me know if you have any ideas about that.
I have tested this PR against the latest neovim, but not sure I'll spend more time making it work with the older neovim and vim.Now it works with both latest neovim and vim.