telescope-frecency.nvim
telescope-frecency.nvim copied to clipboard
FZF Like Anchors/Selectors
This plugin is great! One thing I really miss though is that since this is implemented essentially as a sorter (with underlying matching done just with substrings) I lose all the intelligence of the grammar I have with my default sorter (fzf-native). Primarily, I miss being able to use ^
(consecutive chars at the beginning of the match), '
(consecutive chars anywhere in the match) and $
(consecutive chars at the end of the match.
Is there any way I can regain this functionality? Thanks!
You can just override the sorter. This for example to set your configured default file sorter
:lua require'telescope'.extensions.frecency.frecency{ sorter = require('telescope.config').values.file_sorter() }
Interesting. This works, but the displayed results are shortened, though I'm only able to match against absolute paths, so I always have to match with things like ^/
even though that might not be displayed in the result.
Edit: using the command:
require("telescope").extensions.frecency.frecency({ sorter = require("telescope").extensions.fzf.native_fzf_sorter() })
I wonder if the sorter could be a config option instead?
https://github.com/nvim-telescope/telescope-frecency.nvim/issues/44 shows how to use other sorter
if you're using https://github.com/natecraddock/telescope-zf-native.nvim , after setup, you can use the following code to use zf
as sorter (prioritizes basename/file_name)
require 'telescope'.extensions.frecency.frecency({
sorter = require 'telescope.config'.values.file_sorter(),
require 'telescope.config'.values.file_sorter
is modified by telescope-zf-native, so this is actually another sorter that we're using (not get_fzy_sorter
). But, anyway... it gives you an idea of how to use a non-default sorter with this extension
@FelipeLema thanks for that, i was actually wondering exactly how to use this with zf-native :)