How to deprioritize exact matches #1393
-
in this case, I have a snippet and an LSP suggestion. In my sources, snippets are higher ranked, and the snippet gets ranked higher (image at the top). But as soon as there is an exact match, that exact match gets prioritized (image at the bottom). Is there any way to change that behavior, i.e. deprioritize exact matches? I tried increasing source priority or priority-weight, but it seems that exact matches always get the ranked at the top regardless. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
okay, I actually found it myself by searching the source code for "exact" 😝 for anyone finding this via search: in the |
Beta Was this translation helpful? Give feedback.
okay, I actually found it myself by searching the source code for "exact" 😝
for anyone finding this via search: in the
cmp.setup()
call, you have to modify the list ofcomparators
. I just copied the list but left outcompare.exact
, which disabled prioritizing exact matches :)https://github.com/hrsh7th/nvim-cmp/blob/main/lua/cmp/config/default.lua#L59-L69