diff options
| author | JINNOUCHI Yasushi <d+github@delphinus.dev> | 2021-01-06 12:20:59 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-06 06:20:59 +0300 |
| commit | 402c2ea5fa68fe9c153d4dc98e416e2d1afe3fa0 (patch) | |
| tree | 4291c43f51bf4676217352f0458f7d96d2872989 /lua/telescope/builtin/internal.lua | |
| parent | d2ba51c6caab17147ec476a25668a61a4d6259c9 (diff) | |
add devicons to oldfiles picker (#397)
Diffstat (limited to 'lua/telescope/builtin/internal.lua')
| -rw-r--r-- | lua/telescope/builtin/internal.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lua/telescope/builtin/internal.lua b/lua/telescope/builtin/internal.lua index b71ebb3..48165f9 100644 --- a/lua/telescope/builtin/internal.lua +++ b/lua/telescope/builtin/internal.lua @@ -229,11 +229,15 @@ internal.loclist = function(opts) end internal.oldfiles = function(opts) + local results = vim.tbl_filter(function(val) + return 0 ~= vim.fn.filereadable(val) + end, vim.v.oldfiles) pickers.new(opts, { prompt_title = 'Oldfiles', - finder = finders.new_table(vim.tbl_filter(function(val) - return 0 ~= vim.fn.filereadable(val) - end, vim.v.oldfiles)), + finder = finders.new_table{ + results = results, + entry_maker = opts.entry_maker or make_entry.gen_from_file(opts), + }, sorter = conf.file_sorter(opts), previewer = conf.file_previewer(opts), }):find() |
