lukas-reineke / cmp-rg

ripgrep source for nvim-cmp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comletion for words starts with 'äöü'

JanosSarkoezi opened this issue · comments

Unfortunately, searching with the letters 'äöü' at the beginning of a word does not work. I have created a directory and there is a file with the following content

Österreich
Äußerlich
Über
Test
Haus
hause

If I search for the word 'Test', then the word is also found. But if I do the same with 'Österreich' then the word is not found. Furthermore it seems that the search for the word 'Österreich' looks for words from 'ster...'. Unfortunately I don't have that much knowledge about vim and LUA programming, but the error could be in the line.
local q = string.sub(request.context.cursor_before_line, request.offset)

I can reproduce it. But this is not a bug in cmp-rg, it is a bug in nvim-cmp. If you type Öster, the completion function is only called with ster. The keyword pattern offset probably gets messed up with unicode characters that have more than 1 byte.

I'll close the issue here, please open an issue in nvim-cmp