From 75311f2c04766dd034538c699243ebe2ea040189 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Mon, 23 Nov 2020 12:30:09 -0500 Subject: [PATCH] feat: highlighter only --- lua/telescope/sorters.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/telescope/sorters.lua b/lua/telescope/sorters.lua index 7a15325..1ac410f 100644 --- a/lua/telescope/sorters.lua +++ b/lua/telescope/sorters.lua @@ -407,6 +407,19 @@ sorters.get_fzy_sorter = function(opts) } 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 sorters.get_levenshtein_sorter = function() return Sorter:new {