diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2020-09-02 19:11:38 -0400 |
|---|---|---|
| committer | TJ DeVries <devries.timothyj@gmail.com> | 2020-09-02 19:11:38 -0400 |
| commit | d48a2933d55a5aa2ca3c15e482a90bbffbb49b92 (patch) | |
| tree | 7f44146ba314879c6cd6d7beb5aa026454f5d21c /lua/telescope/builtin.lua | |
| parent | 061307233cdff0a90504117dd48e4fec3a10443a (diff) | |
fix: clear last line
Diffstat (limited to 'lua/telescope/builtin.lua')
| -rw-r--r-- | lua/telescope/builtin.lua | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lua/telescope/builtin.lua b/lua/telescope/builtin.lua index afc104c..d207b99 100644 --- a/lua/telescope/builtin.lua +++ b/lua/telescope/builtin.lua @@ -246,6 +246,8 @@ end builtin.fd = function(opts) + opts = opts or {} + local fd_string = nil if 1 == vim.fn.executable("fd") then fd_string = "fd" @@ -258,9 +260,23 @@ builtin.fd = function(opts) return end + -- TODO: CWD not 100% supported at this moment. + -- Previewers don't work. We'll have to try out something for that later + local cwd = opts.cwd + if cwd then + cwd = vim.fn.expand(cwd) + end + pickers.new(opts, { prompt = 'Find Files', - finder = finders.new_oneshot_job {fd_string}, + finder = finders.new { + fn_command = function() + return { + command = fd_string, + cwd = cwd, + } + end, + }, previewer = previewers.cat, sorter = sorters.get_fuzzy_file(), }):find() |
