summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorsmolck <46855713+smolck@users.noreply.github.com>2020-08-30 14:51:10 -0500
committerTJ DeVries <devries.timothyj@gmail.com>2020-08-31 16:47:28 -0400
commitbb3def47c37ab0e2a8501854f5fa6f4511f06846 (patch)
tree440f310458a1b72f22657bac1fdbdafaf0a70c8f /lua
parent21474b586cc015f01c13ca94bd010925172f32be (diff)
Don't use FZF
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/builtin.lua30
1 files 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