diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2020-11-23 12:30:09 -0500 |
|---|---|---|
| committer | TJ DeVries <devries.timothyj@gmail.com> | 2020-11-23 12:30:09 -0500 |
| commit | 75311f2c04766dd034538c699243ebe2ea040189 (patch) | |
| tree | c7f7860dac4d4d2105348150b16423424409539f /lua | |
| parent | 823f881998aa6891bb5003be53886387fcc08945 (diff) | |
feat: highlighter only
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/sorters.lua | 13 |
1 files changed, 13 insertions, 0 deletions
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 { |
