From 64e59060b1750d0c86761693b6847c3db07afcd2 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Thu, 8 Apr 2021 10:35:44 -0400 Subject: feat: asyncify pickers - except for live_grep (#709) * something kind of works already * yayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayaya * use async for everything besides live jobs * fix: fixup autocmds previewer * fix: lints for prime * temp: Add example of how we can think about async sorters * feat: Allow picker to decide when to cancel * fix: simplify scoring logic and tests * fixup: name * fix: Move back towards more backwards compat methods * fixup: Remove results from opts * fixup: remove trailing quote * fixup: Attempt to clean up some more async items. Next is status * wip: Add todo for when bfredl implements extmarks over the EOL * wip * fixup: got em * fixup: cleaning * fixup: docs --- lua/tests/automated/telescope_spec.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lua/tests') diff --git a/lua/tests/automated/telescope_spec.lua b/lua/tests/automated/telescope_spec.lua index 0f7bc85..6ad09d7 100644 --- a/lua/tests/automated/telescope_spec.lua +++ b/lua/tests/automated/telescope_spec.lua @@ -100,7 +100,12 @@ describe('telescope', function() describe('fzy', function() local sorter = require'telescope.sorters'.get_fzy_sorter() local function score(prompt, line) - return sorter:score(prompt, {ordinal = line}) + return sorter:score( + prompt, + {ordinal = line}, + function(val) return val end, + function() return -1 end + ) end describe("matches", function() -- cgit v1.2.3