Don't use FZF

This commit is contained in:
smolck
2020-08-30 14:51:10 -05:00
committed by TJ DeVries
parent 21474b586c
commit bb3def47c3

View File

@@ -233,29 +233,19 @@ builtin.grep_string = function(opts)
} }
end end
builtin.fzf_history = function() builtin.oldfiles = function()
local history_lines = table.concat(vim.v.oldfiles, '\n') local oldfiles_finder = finders.new {
results = vim.tbl_map(
local fzf = finders.new { function(x) return (x:gsub('\n', '')) end,
maximum_results = 1000, vim.v.oldfiles
fn_command = function(self, prompt) )
return {
command = 'fzf',
args = {'--no-sort', '--filter', prompt},
writer = {
command = 'echo',
args = {history_lines},
} }
}
end
}
local file_picker = pickers.new{} local file_picker = pickers.new{}
file_picker:find { file_picker:find {
prompt = 'FZF History', prompt = 'Oldfiles',
finder = fzf, finder = oldfiles_finder,
sorter = sorters.get_norcalli_sorter()
} }
end end