nvim-lua / completion-nvim

A async completion framework aims to provide completion to neovim's built in LSP written in Lua
Apache License 2.0
973 stars 78 forks source link

Matching should favor `exact` and `substring` against `fuzzy` #343

Open lnicola opened 3 years ago

lnicola commented 3 years ago

Is your feature request related to a problem? Please describe.

Apologies if I'm missing something, I'm quite new to this plugin.

I set

let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy']

However, the ordering of completions I get is less than great:

image

Describe the solution you'd like

Compare to what Code does:

image

I think exact and substring matches should come before fuzzy.

Describe alternatives you've considered

Not sure. Maybe it could use the order from g:completion_matching_strategy_list, but I don't really see the point. PS: I also don't see the point of all, as shown in the README example.