Closed yujinyuz closed 3 years ago
LGTM Thanks. About the slowdown its a known issue and it happens because of sync ts parsing. Everything else about the new buffer previewers is async besides that but i have an idea how to make it a little bit more responsive. When the selected entries change a lot. e.g. when scrolling. If you want i can ping you :] Also should i just merge that?
@Conni2461 Sure! I've already tested that so far and works for me.
Off topic:
Would it be possible for this to implement the tags
as well? LIke using fzf/rg instead?
I have no idea how this works 😆 I just have the power to merge. But i guess not because i can't see a way how we could read the tags file with fzf The problem with tags right now is that the reading is not happening async. There is a PR that tries to achieve that https://github.com/nvim-telescope/telescope.nvim/pull/288 but he is currently stuck and i don't know why its not working
Thanks @Conni2461
I just wanted to use fzf as the default sorter/file selector since it fits my use case better and returns my expected results (via fzf_writer.files
) compared to https://github.com/nvim-telescope/telescope-fzy-native.nvim
Sure thing but fzf-writer
works differently then fzy-native
because here we are starting a fzf termjob and collecting data and let fzf do everything. With fzy we have a compiled shared lib and wrote some ffi so we can call those c functions and that let them do the sorting.
For us to achieve something similar with fzf would be create a c fork of fzf sorting algorithm and write ffi bindings. Then we could have something similar to fzy-native
.
Edit: Basically we have to fork that file in c: https://github.com/junegunn/fzf/blob/master/src/algo/algo.go
One problem I encounter so far in
staged_grep
is when I'm typing too, neovim hangs when using buffer previews.Using the default cat/bat previewer doesn't. Also, the builtin
live_grep
doesn't hang as well