diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index 00e1049..3a5baf7 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -73,7 +73,7 @@ function Picker:new(opts) _on_input_filter_cb = opts.on_input_filter_cb or function() end, finder = opts.finder, - sorter = opts.sorter, + sorter = opts.sorter or require('telescope.sorters').empty(), previewer = opts.previewer, default_selection_index = opts.default_selection_index, diff --git a/lua/telescope/sorters.lua b/lua/telescope/sorters.lua index bf4a735..46a6cc8 100644 --- a/lua/telescope/sorters.lua +++ b/lua/telescope/sorters.lua @@ -465,6 +465,12 @@ sorters.highlighter_only = function(opts) } end +sorters.empty = function() + return Sorter:new { + scoring_function = function() return 0 end, + } +end + -- Bad & Dumb Sorter sorters.get_levenshtein_sorter = function() return Sorter:new {