vim-patch:9.1.1214: matchfuzzy() can be improved for camel case matches

Problem:  When searching for "Cur", CamelCase matches like "lCursor" score
          higher than exact prefix matches like Cursor, which is
          counter-intuitive (Maxim Kim).
Solution: Add a 'camelcase' option to matchfuzzy() that lets users disable
          CamelCase bonuses when needed, making prefix matches rank higher.
          (glepnir)

fixes: vim/vim#16504
closes: vim/vim#16797

28e40a7b55

Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
glepnir
2025-03-18 15:44:45 +08:00
committed by zeertzjq
parent ce590e2077
commit 162edf7b30
6 changed files with 45 additions and 13 deletions

View File

@@ -5815,6 +5815,9 @@ function vim.fn.matchend(expr, pat, start, count) end
--- given sequence.
--- limit Maximum number of matches in {list} to be
--- returned. Zero means no limit.
--- camelcase Use enhanced camel case scoring making results
--- better suited for completion related to
--- programming languages. Default is v:true
---
--- If {list} is a list of dictionaries, then the optional {dict}
--- argument supports the following additional items: