nvim-cmp icon indicating copy to clipboard operation
nvim-cmp copied to clipboard

Request: case-sensitive completion

Open RobinTruax opened this issue 1 year ago • 3 comments

I'm using nvim-cmp for completing prose in a LaTeX Neovim config that I'm creating. I've created a dictionary of prose words, but I want autocompletion for it to be case-sensitive. Is there an option for this, or some way to override the matcher to force it to be case-sensitive?

RobinTruax avatar Sep 06 '23 05:09 RobinTruax

It's already case-sensitive for non-Latin letters, unfortunately (for me).

Andrew15-5 avatar Apr 19 '24 03:04 Andrew15-5

I believe it is not possible (for alphanumeric strings) because matcher.lua makes use of char.match from https://github.com/hrsh7th/nvim-cmp/blob/d818fd0624205b34e14888358037fb6f5dc51234/lua/cmp/utils/char.lua#L109-L115 which is explicitly case insensitive.

fionn avatar Jul 19 '24 16:07 fionn

https://github.com/hrsh7th/nvim-cmp/blob/d818fd0624205b34e14888358037fb6f5dc51234/lua/cmp/matcher.lua#L27

nvim-cmp uses case-sensitive as scoring.

Shougo avatar Jul 20 '24 01:07 Shougo