Incorporating fzf into telescope using plenary's job writer functionality.
fzf
and rg
to both be installed.
More can be added later.
fzf_writer.grep
require('telescope').extensions.fzf_writer.grep()
live_grep
, but more async-ishfzf_writer.staged_grep
require('telescope').extensions.fzf_writer.staged_grep()
live_grep
, but more async-ish and bonus feature.rg
to filter exact match before |
and afterwards uses fzf
to fuzzy find over results.fzf_separator
: default "|", the character to split between rg mode and fzf mode.fzf_writer.files
require('telescope').extensions.fzf_writer.files()
find_files
, but more async-ishrequire('telescope').setup {
extensions = {
fzf_writer = {
minimum_grep_characters = 2,
minimum_files_characters = 2,
-- Disabled by default.
-- Will probably slow down some aspects of the sorter, but can make color highlights.
-- I will work on this more later.
use_highlighter = true,
}
}
}
Could probably still make this more async by doing a better job with some of the matching strategy / filtering and maybe not using rg for files. Idk, it was just a thought so I made this.