Open dimroc opened 1 year ago
Does the fuzzy_sorter satisfy your use case?
# = fuzzy_sorter: Sort the tree recursively based on fzy algorithm,
showing top score files. Space separated keywords
are treated as `and` which will be useful to narrow
down as you type. The file list is taken from fd
and other programs mentioned in `fuzzy_finder`.
`fuzzy_sorter_directory` can be used to show list
of directories instead.
You can enable this like in the example here.
Closing this as solved.
Does the fuzzy_sorter satisfy your use case?
# = fuzzy_sorter: Sort the tree recursively based on fzy algorithm, showing top score files. Space separated keywords are treated as `and` which will be useful to narrow down as you type. The file list is taken from fd and other programs mentioned in `fuzzy_finder`. `fuzzy_sorter_directory` can be used to show list of directories instead.
You can enable this like in the example here.
This doesn't achieve what I'm hoping for. While this has the word fuzzy, it doesn't allow arbitrary combination of letters without spaces to be a presence check for files like FZF does
Example to knowledge share
I get what you're saying @dimroc. It was a pragmatic optimization to pre-filter the files being scored by searching for the letters typed in the order they were typed.
This could be handled differently but would require a lot of work to make sure it stays performant. I'll re-open the issue as a placeholder for further discussion.
I believe this should be closed as wont-fix
due to speed limitations. @cseickel
I did test bunch of algorithms when implementing fuzzy sorter and settled on space separated ands looking at speed vs convince.
We need some kind of language that is faster than lua to achieve better results which is likely never happening.
We need some kind of language that is faster than lua to achieve better results which is likely never happening.
I agree we can't do more in lua, but there are other options.
I'm thinking that the next step is to integrate with another library for the scoring which delegates the work out to a compiled service, rather than scoring in lua. I think there is an nvim fzf api plugin available now that may do the trick.
If you want faster language than lua, then I recommend zf written in zig. I already use it with telescope. IMO better than fzf because it prioritizes files over paths.
I use it like this
{
"telescope.nvim",
dependencies = {
"natecraddock/telescope-zf-native.nvim",
config = function()
require("telescope").load_extension("zf-native")
end,
},
},
https://github.com/nvim-neo-tree/neo-tree.nvim/blob/2b2f74828eeb02cf29d6b21aa32eedadadc94ca7/lua/neo-tree/sources/filesystem/lib/filter_external.lua#L197-L201
The current file filter looks for contiguous blocks of text at the beginning of the path. It would be great if we could get fzf file filtering ala command-T. Seems like the work was started above.