summaryrefslogtreecommitdiff
path: root/lua/telescope/sorters.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-09-01 22:27:50 -0400
committerTJ DeVries <devries.timothyj@gmail.com>2020-09-01 22:27:50 -0400
commit39096492aba5e2fe8a8c0bc11a040a90bb95280b (patch)
tree0bd503bbf045d6057c40b9c6484873cfc785eea4 /lua/telescope/sorters.lua
parentc11a6613625008c7d45702301cdf404873674c58 (diff)
feat/hack: Add builtin.builtin
Diffstat (limited to 'lua/telescope/sorters.lua')
-rw-r--r--lua/telescope/sorters.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/lua/telescope/sorters.lua b/lua/telescope/sorters.lua
index 6074f1b..e2a7639 100644
--- a/lua/telescope/sorters.lua
+++ b/lua/telescope/sorters.lua
@@ -179,15 +179,13 @@ sorters.get_fuzzy_file = function(opts)
tail_modifier = 2
end
- -- TODO: Copied from ashkan.
local denominator = (
(10 * match_count / #prompt_lower_ngrams)
-- biases for shorter strings
- -- TODO(ashkan): this can bias towards repeated finds of the same
- -- subpattern with overlapping_ngrams
+ 3 * match_count * ngram_len / #line
+ consecutive_matches
+ N / (contains_string or (2 * #line))
+
-- + 30/(c1 or 2*N)
-- TODO: It might be possible that this too strongly correlates,