In the general case I can see why case-insensitive completion makes sense, but if I've explicitly provided an upper case letter I would expect it to prioritise exact matches.
What's even stranger is that without entering any text at all, Name
is the first option:
Comment From: findleyr
Thanks for the report. I think you're right: we should update our fuzzy matcher to prefer exact case match.
This is a gopls issue, so transferring to the gopls issue tracker.
Comment From: muirdm
There is a bonus for case sensitive match already here. I think the problem is we use the same bonus for matching the first letter of a segment, so the match bonus doesn't differentiate the case in this issue. It might work to just split those apart into separate bonuses.
Comment From: gopherbot
Change https://go.dev/cl/592519 mentions this issue: gopls/matcher: don't give bonus to case insensitive match