You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An extension for telescope.nvim that combines the results from builtin.oldfiles({ cwd_only = true }) with builtin.find_files
In other words, it searches for files in the current directory, and displays files in order of how recently they were opened.
Setup
Lazy:
{
'nvim-telescope/telescope.nvim',
tag='0.1.8',
dependencies= {
'nvim-lua/plenary.nvim''ronandalton/telescope-recent-files.nvim',
},
config=function()
require('telescope').load_extension('recent-files')
-- Example keymap:vim.keymap.set('n', '<C-p>', require('telescope').extensions['recent-files'].recent_files, { desc='Search Files' })
end
},
Note that git must also be installed so that files in .gitignore can be filtered out of recent search results.
Options
The following options can be specified (default values are given):
{
cwd=nil, -- if unspecified, current directory is usedinclude_current_file=false,
-- any other options accepted by builtin.oldfiles or builtin.find_files are also accepted
}
Alternatives
I made this because I couldn't find a plugin that did exactly what I needed.
I would suggest this functionality be built into Telescope (it would be quite simple, I would be happy to make a PR).