From bb3def47c37ab0e2a8501854f5fa6f4511f06846 Mon Sep 17 00:00:00 2001 From: smolck <46855713+smolck@users.noreply.github.com> Date: Sun, 30 Aug 2020 14:51:10 -0500 Subject: [PATCH] Don't use FZF --- lua/telescope/builtin.lua | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/lua/telescope/builtin.lua b/lua/telescope/builtin.lua index 33728b2..c63fda9 100644 --- a/lua/telescope/builtin.lua +++ b/lua/telescope/builtin.lua @@ -233,29 +233,19 @@ builtin.grep_string = function(opts) } end -builtin.fzf_history = function() - local history_lines = table.concat(vim.v.oldfiles, '\n') - - local fzf = finders.new { - maximum_results = 1000, - fn_command = function(self, prompt) - return { - command = 'fzf', - args = {'--no-sort', '--filter', prompt}, - - writer = { - command = 'echo', - args = {history_lines}, - } - } - end +builtin.oldfiles = function() + local oldfiles_finder = finders.new { + results = vim.tbl_map( + function(x) return (x:gsub('\n', '')) end, + vim.v.oldfiles + ) } - - local file_picker = pickers.new { } + local file_picker = pickers.new{} file_picker:find { - prompt = 'FZF History', - finder = fzf, + prompt = 'Oldfiles', + finder = oldfiles_finder, + sorter = sorters.get_norcalli_sorter() } end