Streamed some refactoring. More work to do

This commit is contained in:
TJ DeVries
2020-07-31 00:05:22 -04:00
parent ababfbfd88
commit fa0382d93e
12 changed files with 555 additions and 112 deletions

View File

@@ -1,3 +1,4 @@
package.loaded['telescope.pickers'] = nil
local telescope = require('telescope')
-- Goals:
@@ -61,15 +62,15 @@ local file_sorter = telescope.sorters.new {
if prompt == '' then return 0 end
if not line then return -1 end
local dist = string_distance(prompt, line)
-- if dist > (0.75 * #line) and #prompt > 3 then
-- return -1
-- end
return dist
return tonumber(vim.fn.systemlist(string.format(
"echo '%s' | ~/tmp/fuzzy_test/target/debug/fuzzy_test '%s'",
line,
prompt
))[1])
end
}
local file_previewer = telescope.previewers.vim_buffer
local file_picker = telescope.pickers.new {