feat: highlighter only

This commit is contained in:
TJ DeVries
2020-11-23 12:30:09 -05:00
parent 823f881998
commit 75311f2c04

View File

@@ -407,6 +407,19 @@ sorters.get_fzy_sorter = function(opts)
} }
end end
sorters.highlighter_only = function(opts)
opts = opts or {}
local fzy = opts.fzy_mod or require('telescope.algos.fzy')
return Sorter:new {
scoring_function = function() return 0 end,
highlighter = function(_, prompt, display)
return fzy.positions(prompt, display)
end,
}
end
-- Bad & Dumb Sorter -- Bad & Dumb Sorter
sorters.get_levenshtein_sorter = function() sorters.get_levenshtein_sorter = function()
return Sorter:new { return Sorter:new {