Do you really need a plugin for fuzzy finding files in Neovim?
I'm a simple man; I used telescope.nvim for finding files and not for much else. But I'm also a minimalism junkie so I'm always on the lookout for ways to get more value with less dependencies. I really liked Telescope but like I said, me being me, I began to question if I need it with all it bells and whistles just for finding files. It felt overkill for the job. Also, recently I migrated to blink.cmp for completion. I liked the fact that it gives you commonly used sources out of the box, and that includes cmdline completion. This morning it dawned on me that the most important pieces for my needs are already implemented in Neovim and blink and I just have to mould them into a file picker. So I came up with this lua code that I just put in lua directory and call its setup() in my init.lua: local M = {} local cmd = "git ls-files -c -o --exclude-standard" local function get_list_completion(arg_lead, cmdline, cur_pos) local cmdout = io.popen(cmd):read("*a") cmdout = string.gsub(cmdout, "^%s*(.-)%s*$", "%1") return cmdout:split("\n") end local function cmd_handler(opts) if vim.tbl_count(opts.fargs) == 0 then return end for _, arg in ipairs(opts.fargs) do vim.cmd.edit({args = {arg}}) end end function M.setup() vim.api.nvim_create_user_command( "FilePick", cmd_handler, { complete = get_list_completion, nargs = '*', force = true } ) vim.keymap.set('n', '-', function () local keys = vim.api.nvim_replace_termcodes(':FilePick ', true, false, true) vim.api.nvim_input(keys) end) end return M As you see it's just 32 lines with the empty lines. And it produces something that looks like this: I just have to tab and enter. What it does is: It creates a command "FilePick" with a custom completion function. The completion function gets the list of files by using git's ls-files but any command that lists the files can be used. I'm using this because it gives me the same output as rg --files but faster (yes, than ripgrep based on my crude benchmarking using time but that's another topic). Then finally for convenience, creates a mapping - that starts the command, and invokes the completion. From there you can type the fuzzy name, press tab (depending on your mapping) and enter. Notice that I made it behave like this because I have enabled the cmdline completion from blink but I have its auto_show and preselect disabled. That's why the sequence for the last step is Write the command Invoke completion (tab), this will make the command the only candidate Press space. This invokes the custom completion function BUT does not complete the line with the first item because I want to write the fuzzy pattern next, not the full path of the first file. So there you have it, my custom file picker implemented in more or less the same number of lines as a Telescope configuration. So my answer to the title is...no. Thank you for reading.

I'm a simple man; I used telescope.nvim for finding files and not for much else. But I'm also a minimalism junkie so I'm always on the lookout for ways to get more value with less dependencies.
I really liked Telescope but like I said, me being me, I began to question if I need it with all it bells and whistles just for finding files. It felt overkill for the job. Also, recently I migrated to blink.cmp for completion. I liked the fact that it gives you commonly used sources out of the box, and that includes cmdline completion.
This morning it dawned on me that the most important pieces for my needs are already implemented in Neovim and blink and I just have to mould them into a file picker. So I came up with this lua code that I just put in lua
directory and call its setup()
in my init.lua
:
local M = {}
local cmd = "git ls-files -c -o --exclude-standard"
local function get_list_completion(arg_lead, cmdline, cur_pos)
local cmdout = io.popen(cmd):read("*a")
cmdout = string.gsub(cmdout, "^%s*(.-)%s*$", "%1")
return cmdout:split("\n")
end
local function cmd_handler(opts)
if vim.tbl_count(opts.fargs) == 0 then
return
end
for _, arg in ipairs(opts.fargs) do
vim.cmd.edit({args = {arg}})
end
end
function M.setup()
vim.api.nvim_create_user_command(
"FilePick",
cmd_handler,
{ complete = get_list_completion, nargs = '*', force = true }
)
vim.keymap.set('n', '-', function ()
local keys = vim.api.nvim_replace_termcodes(':FilePick ' , true, false, true)
vim.api.nvim_input(keys)
end)
end
return M
As you see it's just 32 lines with the empty lines. And it produces something that looks like this:
I just have to tab and enter.
What it does is:
- It creates a command "FilePick" with a custom completion function.
- The completion function gets the list of files by using git's
ls-files
but any command that lists the files can be used. I'm using this because it gives me the same output asrg --files
but faster (yes, thanripgrep
based on my crude benchmarking usingtime
but that's another topic). - Then finally for convenience, creates a mapping
-
that starts the command, and invokes the completion. From there you can type the fuzzy name, press tab (depending on your mapping) and enter.
Notice that I made it behave like this because I have enabled the cmdline
completion from blink but I have its auto_show
and preselect
disabled. That's why the sequence for the last step is
- Write the command
- Invoke completion (tab), this will make the command the only candidate
- Press space. This invokes the custom completion function BUT does not complete the line with the first item because I want to write the fuzzy pattern next, not the full path of the first file.
So there you have it, my custom file picker implemented in more or less the same number of lines as a Telescope configuration. So my answer to the title is...no. Thank you for reading.